https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101266
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Component|debug |c Ever confirmed|0 |1 Version|tree-ssa |12.0 Last reconfirmed| |2021-06-30 Status|UNCONFIRMED |NEW --- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> --- Confirmed. We hit #1 0x0000000000d898e5 in loc_list_from_tree_1 (loc= <compound_literal_expr 0x7ffff6688240>, want_address=0, context=0x0) at /home/rguenther/src/gcc2/gcc/dwarf2out.c:19421 19421 gcc_unreachable (); (gdb) l 19416 } 19417 19418 /* Otherwise this is a generic code; we should just lists all of 19419 these explicitly. We forgot one. */ 19420 if (flag_checking) 19421 gcc_unreachable (); (gdb) p loc $1 = <compound_literal_expr 0x7ffff6688240> (gdb) p debug_generic_expr (loc) <<< Unknown tree: compound_literal_expr int D.1943 = 1; >>> and the original tree we ask for is (long int) SAVE_EXPR <<<< Unknown tree: compound_literal_expr int D.1943 = 1; >>>> + -1 this looks like some missed DECL_EXPR / gimplification or a missed error. clang complains: > clang-9 t.c -S t.c:1:9: warning: type specifier missing, defaults to 'int' [-Wimplicit-int] typedef U; ~~~~~~~ ^ t.c:2:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int] fn8(U (*)[(int){1}]) {} ^ t.c:2:9: error: parameter name omitted fn8(U (*)[(int){1}]) {} ^ 2 warnings and 1 error generated. but adding a parameter name doesn't fix anything. Note we call dwarf2out_decl via #14 0x0000000000d9f4f4 in dwarf2out_type_decl ( decl=<type_decl 0x7ffff656b428>, local=0) at /home/rguenther/src/gcc2/gcc/dwarf2out.c:27099 #15 0x000000000120699d in rest_of_decl_compilation ( decl=<type_decl 0x7ffff656b428>, top_level=1, at_end=0) at /home/rguenther/src/gcc2/gcc/passes.c:251 #16 0x0000000000a614a7 in finish_decl (decl=<type_decl 0x7ffff656b428>, init_loc=246464, init=<tree 0x0>, origtype=<tree 0x0>, asmspec_tree=<tree 0x0>) at /home/rguenther/src/gcc2/gcc/c/c-decl.c:5606 #17 0x0000000000a65c38 in grokdeclarator (declarator=0x385b320, declspecs=0x385b170, decl_context=PARM, initialized=false, width=0x0, decl_attrs=0x7fffffffd628, expr=0x7fffffffd648, expr_const_operands=0x7fffffffd49f, deprecated_state=DEPRECATED_NORMAL) at /home/rguenther/src/gcc2/gcc/c/c-decl.c:7171 so this is before any gimplification happened.