[Bug ipa/84658] [7/8 Regression] -O3 -fmerge-all-constants causes incorrect for-each loop generation.
jakub at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Mar 2 12:45:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84658
--- Comment #8 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
(In reply to Martin Liška from comment #6)
> (In reply to Jakub Jelinek from comment #3)
> > Seems the inliner immediately undoes what ICF did and both get inlined into
> > main as well.
>
> It's not undoing the decision because the symbol (Bar) is global. So it both
> inlines into main and the wrapper is preserved. But it's not triggering the
> issue.
Well, it does, because it inlines Foo back into Bar, so all the ICF effort
except for creating the variable alias is gone.
More information about the Gcc-bugs
mailing list