https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91476
Jonathan Wakely <redi at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|needs-bisection | CC| |jason at gcc dot gnu.org --- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> --- Started to fail with r268252: PR c++/89001 - mangling of reference temporaries It used to be the case that the mangled name of a reference temporary didn't need to be standardized, because all access would be through the reference. But now constant expressions can look through references and so different translation units need to agree on the address of a temporary in the initializer of a reference with vague linkage. * cp-tree.h (struct saved_scope): Add ref_temp_count. (current_ref_temp_count): New macro. * mangle.c (mangle_ref_init_variable): Use it. * typeck2.c (store_init_value): Clear it. * call.c (make_temporary_var_for_ref_to_temp): Copy public and comdat.