https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89001

            Bug ID: 89001
           Summary: g++ uses wrong mangling for lifetime-extended
                    temporaries
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: richard-gccbugzilla at metafoo dot co.uk
  Target Milestone: ---

Consider:

inline int &&r = 0;
int *p = &r;

GCC mangles the lifetime-extended temporary as _ZGR1r0, which doesn't match the
ABI mangling rule
(http://itanium-cxx-abi.github.io/cxx-abi/abi.html#mangling-special-temporaries).
The mangling required by the ABI (and produced by Clang) is _ZGR1r_

Reply via email to