[patch, wrong-code, 4.2/4.3/4.4 regression] Patch for PR38615

Andrew Pinski pinskia@gmail.com
Tue Jan 20 22:10:00 GMT 2009

On Tue, Jan 20, 2009 at 9:42 AM, Steve Ellcey <sje@cup.hp.com> wrote:
> PR middle-end/38615 is a wrong-code bug on the list of 4.4 regressions.
> Promoting a initalitialized const auto variable to static appears to be
> an invalid optimization so this patch removes it.  This change could
> have a performance impact but I made no attempt to measure it since the
> optimization is invalid and just shouldn't be done.

I think removing this optimization is not a good idea.  How about just
disabling the optimization if TREE_ADDRESS is set on the decl?

Andrew Pinski

More information about the Gcc-patches mailing list