https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64827
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |missed-optimization Status|UNCONFIRMED |NEW Last reconfirmed| |2015-01-28 CC| |hubicka at gcc dot gnu.org, | |jamborm at gcc dot gnu.org Component|lto |ipa Ever confirmed|0 |1 --- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> --- It is a non-trivial transformation ;) First 'foo' has to be promoted to a constant. It's not written to - but it has its address taken, so to prove that is non-trivial (and not done IIRC). Then we have to apply IPA-CP. I guess it's IPA references fault in some way. Btw, on trunk we inline the function but fail to constant fold from the initializer.