https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64314
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Component|ipa |c++ --- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> --- We walk the initializer of 'a' which is {.c={{.a=TARGET_EXPR <D.2291, <<< Unknown tree: aggr_init_expr 4 __comp_ctor D.2291 (struct C *) <<< Unknown tree: void_cst >>> >>>>}}} and somehow expect we never reach a VAR_DECL when doing that. What we visit here is the TARGET_EXPR target and its use in the __comp_ctor call. So the assert is somewhat bogus (but it certainly was designed to make sure we capture every variable and function!). We can restrict it to catch global vars only (as otherwise varpool_node::get_create will ICE anyway). But then after fixing the above we'll ICE in output_constant ... So it seems this is a frontend bug after all and TARGET_EXPRs shouldn't appear here.