[Bug ipa/95558] [9/10/11/12 Regression] Invalid IPA optimizations based on weak definition

2022-01-21 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95558 Richard Biener changed: What|Removed |Added Priority|P3 |P2

[Bug ipa/95558] [9/10/11/12 Regression] Invalid IPA optimizations based on weak definition

2022-01-17 Thread hubicka at kam dot mff.cuni.cz via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95558 --- Comment #13 from hubicka at kam dot mff.cuni.cz --- > Result pure looping 0 > Function found to be pure: foo/4 This is good - we are supposed to find it to be pure and walk all aliases and update noninterposable ones > Declaration updated to

[Bug ipa/95558] [9/10/11/12 Regression] Invalid IPA optimizations based on weak definition

2022-01-17 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95558 --- Comment #12 from Andrew Pinski --- (In reply to Rich Felker from comment #11) > Are you sure? If pure/const discovery is no longer applied to weak > definitions, it shouldn't be able to propagate to a non-inlined caller. Of > course the fix

[Bug ipa/95558] [9/10/11/12 Regression] Invalid IPA optimizations based on weak definition

2022-01-17 Thread bugdal at aerifal dot cx via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95558 --- Comment #11 from Rich Felker --- Are you sure? If pure/const discovery is no longer applied to weak definitions, it shouldn't be able to propagate to a non-inlined caller. Of course the fix may be incomplete or not working, which I guess we

[Bug ipa/95558] [9/10/11/12 Regression] Invalid IPA optimizations based on weak definition

2022-01-17 Thread amonakov at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95558 --- Comment #10 from Alexander Monakov --- As comment #5 mentioned, it is still broken, you just need -fno-inline in addition to -O2 for the original testcase. Andrew's remark is quite useful for situations like this, you know :)

[Bug ipa/95558] [9/10/11/12 Regression] Invalid IPA optimizations based on weak definition

2022-01-17 Thread bugdal at aerifal dot cx via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95558 --- Comment #9 from Rich Felker --- Can you provide a link to the commit that might have fixed it? I imagine it's simple enough to backport, in which case I'd like to do so.

[Bug ipa/95558] [9/10/11/12 Regression] Invalid IPA optimizations based on weak definition

2022-01-17 Thread hubicka at kam dot mff.cuni.cz via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95558 --- Comment #8 from hubicka at kam dot mff.cuni.cz --- > > Do weak aliases fall under some implicit ODR here? > > The whole definition of "weak" is that it entitles you to make a definition > that will be exempt from ODR, where a non-weak

[Bug ipa/95558] [9/10/11/12 Regression] Invalid IPA optimizations based on weak definition

2022-01-17 Thread bugdal at aerifal dot cx via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95558 --- Comment #7 from Rich Felker --- > Do weak aliases fall under some implicit ODR here? The whole definition of "weak" is that it entitles you to make a definition that will be exempt from ODR, where a non-weak definition, if any, replaces it.

[Bug ipa/95558] [9/10/11/12 Regression] Invalid IPA optimizations based on weak definition

2022-01-17 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95558 --- Comment #6 from Richard Biener --- Honza? What's your stance here? Do weak aliases fall under some implicit ODR here?

[Bug ipa/95558] [9/10/11/12 Regression] Invalid IPA optimizations based on weak definition

2021-09-21 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95558 Andrew Pinski changed: What|Removed |Added Known to fail||4.7.1 Known to work|