[Bug ipa/95558] Invalid IPA optimizations based on weak definition

bugdal at aerifal dot cx gcc-bugzilla@gcc.gnu.org
Sat Jun 6 14:36:08 GMT 2020


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

--- Comment #2 from Rich Felker <bugdal at aerifal dot cx> ---
Wow. It's interesting that we've never seen this lead to incorrect codegen
before, though. All weak dummies should be affected, but only in some cases
does the pure get used to optimize out the external call.

This suggests there's a major missed optimization around pure functions too, in
addition to the wrong application of pure (transfering it from the weak
definition to the external declaration) that's the bug.


More information about the Gcc-bugs mailing list