https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88256
--- Comment #13 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Jason Merrill <ja...@gcc.gnu.org>: https://gcc.gnu.org/g:3539fc1317267b30eb7c4ad48d52f4e46b3a198a commit r10-6405-g3539fc1317267b30eb7c4ad48d52f4e46b3a198a Author: Jason Merrill <ja...@redhat.com> Date: Fri Jan 31 21:59:48 2020 -0500 c++: Fix cast to pointer to VLA. The C front-end fixed this issue in r257620 by adding a DECL_EXPR from grokdeclarator. We don't have an easy way to do that in the C++ front-end, but it works fine to create and prepend a DECL_EXPR when we are genericizing the NOP_EXPR for the cast. The C patch wraps the DECL_EXPR in a BIND_EXPR, but that seems unnecessary in C++; this is just a hook to run gimplify_type_sizes, we aren't actually declaring anything that we need to worry about scoping for. PR c++/88256 * cp-gimplify.c (predeclare_vla): New. (cp_genericize_r) [NOP_EXPR]: Call it.