https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114913
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Component|middle-end |c++ --- Comment #6 from Richard Biener <rguenth at gcc dot gnu.org> --- #4 0x00000000016da304 in fold_ctor_reference ( type=<pointer_type 0x7ffff70417e0>, ctor=<addr_expr 0x7ffff71bfe80>, poly_offset=..., poly_size=..., from_decl=<var_decl 0x7ffff71ba750 HelloWorld>, suboff=0x7fffffffcbb8) at /space/rguenther/src/gcc/gcc/gimple-fold.cc:8236 8236 return canonicalize_constructor_val (unshare_expr (ctor), from_decl); 'ctor' is the ADDR_EXPR that doesn't have TREE_CONSTANT set correctly. The tree is probably mangled after the ADDR_EXPR is built. This looks like a bug in the C++ frontend to me.