https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99835
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |hubicka at gcc dot gnu.org, | |marxin at gcc dot gnu.org Component|tree-optimization |ipa Last reconfirmed| |2021-03-31 Keywords| |missed-optimization Ever confirmed|0 |1 Status|UNCONFIRMED |NEW Version|unknown |11.0 --- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> --- At -O3 the unused 'c' remains. Likely different (recursive?) inlining makes us process a cgraph cycle in different order and thus fail to elide the output of 'c' (it's output first at -O3). Fixing that would need processing cgraph SCCs with an extra IPA phase in main optimization so we get a chance to do extra node removal (maybe order the cycles so that functions we can elide - aka static ones - are processed last).