The following valid code snippet (compiled with "-std=gnu++0x") triggers an ICE since GCC 4.7.0: ======================== struct A { ~A(); }; int foo(A = {}); int i = foo(); ======================== bug.cc: In function 'void __static_initialization_and_destruction_0(int, int)': bug.cc:8:13: internal compiler error: in create_tmp_var, at gimplify.c:438 int i = foo(); ^ 0x95b833 create_tmp_var(tree_node*, char const*) ../../gcc/gcc/gimplify.c:438 0x95d10c create_tmp_from_val ../../gcc/gcc/gimplify.c:521 0x95d10c lookup_tmp_var ../../gcc/gcc/gimplify.c:543 0x95d10c internal_get_tmp_var ../../gcc/gcc/gimplify.c:587 0x95dace gimplify_expr(tree_node**, gimple_statement_d**, gimple_statement_d**, bool (*)(tree_node*), int) ../../gcc/gcc/gimplify.c:8153 0x966eb9 gimplify_call_expr ../../gcc/gcc/gimplify.c:2635 0x95ef88 gimplify_expr(tree_node**, gimple_statement_d**, gimple_statement_d**, bool (*)(tree_node*), int) ../../gcc/gcc/gimplify.c:7293 0x96a00a gimplify_modify_expr ../../gcc/gcc/gimplify.c:4875 0x95e25b gimplify_expr(tree_node**, gimple_statement_d**, gimple_statement_d**, bool (*)(tree_node*), int) ../../gcc/gcc/gimplify.c:7322 0x9620d6 gimplify_stmt(tree_node**, gimple_statement_d**) ../../gcc/gcc/gimplify.c:5699 0x95eeaf gimplify_cleanup_point_expr ../../gcc/gcc/gimplify.c:5475 0x95eeaf gimplify_expr(tree_node**, gimple_statement_d**, gimple_statement_d**, bool (*)(tree_node*), int) ../../gcc/gcc/gimplify.c:7659 0x9620d6 gimplify_stmt(tree_node**, gimple_statement_d**) ../../gcc/gcc/gimplify.c:5699 0x95f30b gimplify_statement_list ../../gcc/gcc/gimplify.c:1525 0x95f30b gimplify_expr(tree_node**, gimple_statement_d**, gimple_statement_d**, bool (*)(tree_node*), int) ../../gcc/gcc/gimplify.c:7711 0x9620d6 gimplify_stmt(tree_node**, gimple_statement_d**) ../../gcc/gcc/gimplify.c:5699 0x965d65 gimplify_cond_expr ../../gcc/gcc/gimplify.c:3315 0x95e292 gimplify_expr(tree_node**, gimple_statement_d**, gimple_statement_d**, bool (*)(tree_node*), int) ../../gcc/gcc/gimplify.c:7278 0x9620d6 gimplify_stmt(tree_node**, gimple_statement_d**) ../../gcc/gcc/gimplify.c:5699 0x965d65 gimplify_cond_expr ../../gcc/gcc/gimplify.c:3315 Please submit a full bug report, [etc.]
Before GCC 4.7.0 the code was wrongly rejected.
*** Bug 59740 has been marked as a duplicate of this bug. ***
I don't think this can be classed as a regression when the syntax wasn't supported until 4.7.0, so never worked
Fixed by Jason's patch for PR60367. The testcase added there seems to cover the testcase here, so no further action is required. Marking as duplicate then. *** This bug has been marked as a duplicate of bug 60367 ***