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

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Richard Biener from comment #1)
> At -O3 we inline less, keeping the call to d() in main().  We then fail to
> constant propagate the const promoted 'b'.

So yes we do inline less kinda of. At -O3, we inline a into main in einline
(but not at -O1) and this somehow allows us to inline d into main during the
IPA inline phase. 


> Not sure why IPA CP doesn't get it (promotion happens too late?).

Yes promotion to constant of b happens after IPA CP. I wonder if could run
static-var twice once before even eiline ...

Reply via email to