[Bug ipa/61144] [4.9/4.10 Regression] Invalid optimizations for extern vars with local weak definitions

bugdal at aerifal dot cx gcc-bugzilla@gcc.gnu.org
Thu Jul 31 22:56:00 GMT 2014


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

--- Comment #30 from Rich Felker <bugdal at aerifal dot cx> ---
I don't really understand how weak aliases come into play for implementing C++
features, but if their semantics are not identical to the necessary C++
semantics, the compiler should just distinguish between the relevant C++
semantics and weak alias semantics rather than trying to force two semantically
different concepts to use the same feature in ways that breaks either one or
the other.

Also, was C++ behavior broken prior to 4.9.0, or is there some other reason
that weak aliases worked without breaking C++ mandatory constant folding prior
to 4.9.0?



More information about the Gcc-bugs mailing list