g:4e6bf0b9dd5585df1a1472d6a93b9fff72fe2524 fixes the long-standing issue w/ VLAs and statement expressions for the C front-end, but not for the C++ one. g++ still ICEs when compiling the following testcase, extracted from gcc/testsuite/gcc.dg/vla-stexp-9.c: void foo(void) { if (2 * sizeof(int) != sizeof((*({ int N = 2; int (*x)[9][N] = 0; x; })[1]))) __builtin_abort(); } % g++-12.0.0 -c mrzd2yqy.c mrzd2yqy.c: In function 'void foo()': mrzd2yqy.c:3:29: internal compiler error: in gimplify_var_or_parm_decl, at gimplify.c:2975 3 | if (2 * sizeof(int) != sizeof((*({ int N = 2; int (*x)[9][N] = 0; x; })[1]))) | ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 0x7a339b gimplify_var_or_parm_decl /var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211121/work/gcc-12-20211121/gcc/gimplify.c:2975 0xea3e1f gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*), int) /var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211121/work/gcc-12-20211121/gcc/gimplify.c:15127 0xea98e0 internal_get_tmp_var /var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211121/work/gcc-12-20211121/gcc/gimplify.c:624 0xeac95e get_initialized_tmp_var(tree_node*, gimple**, gimple**, bool) /var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211121/work/gcc-12-20211121/gcc/gimplify.c:679 0xeac95e gimplify_save_expr /var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211121/work/gcc-12-20211121/gcc/gimplify.c:6267 0xea4298 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*), int) /var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211121/work/gcc-12-20211121/gcc/gimplify.c:14967 0xea3e7d gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*), int) /var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211121/work/gcc-12-20211121/gcc/gimplify.c:14971 0xea3a51 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*), int) /var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211121/work/gcc-12-20211121/gcc/gimplify.c:15432 0xea3a51 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*), int) /var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211121/work/gcc-12-20211121/gcc/gimplify.c:15432 0xebbd7c gimplify_cond_expr /var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211121/work/gcc-12-20211121/gcc/gimplify.c:4329 0xea446c gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*), int) /var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211121/work/gcc-12-20211121/gcc/gimplify.c:14623 0xea79e6 gimplify_stmt(tree_node**, gimple**) /var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211121/work/gcc-12-20211121/gcc/gimplify.c:7024 0xea82af gimplify_bind_expr /var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211121/work/gcc-12-20211121/gcc/gimplify.c:1426 0xea444f gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*), int) /var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211121/work/gcc-12-20211121/gcc/gimplify.c:14867 0xea79e6 gimplify_stmt(tree_node**, gimple**) /var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211121/work/gcc-12-20211121/gcc/gimplify.c:7024 0xea82af gimplify_bind_expr /var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211121/work/gcc-12-20211121/gcc/gimplify.c:1426 0xea444f gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*), int) /var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211121/work/gcc-12-20211121/gcc/gimplify.c:14867 0xebeb96 gimplify_stmt(tree_node**, gimple**) /var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211121/work/gcc-12-20211121/gcc/gimplify.c:7024 0xebeb96 gimplify_body(tree_node*, bool) /var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211121/work/gcc-12-20211121/gcc/gimplify.c:15912 0xebf02d gimplify_function_tree(tree_node*) /var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211121/work/gcc-12-20211121/gcc/gimplify.c:16066
Confirmed.