This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Warning regression with COMPARE fixes
- To: mark at codesourcery dot com (Mark Mitchell)
- Subject: Re: Warning regression with COMPARE fixes
- From: Joe Buck <jbuck at racerx dot synopsys dot com>
- Date: Mon, 19 Mar 2001 17:11:19 -0800 (PST)
- Cc: gcc at gcc dot gnu dot org, geoffk at cygnus dot com (Geoff Keating)
Mark writes:
> My recent checkin to fix the ARM bootstrap problem (the patch that
> fixed an over-agressive optimization in CSE), apparently causes the
> PowerPC compiler to emit a warning about this code:
>
> int
> sub ()
> {
> int i = 0;
> int j = 0;
> int k; /* { dg-bogus "`k' might be used uninitialized" "uninitialized warning regression" } */
>
> while (i == 0 && j == 0)
> {
> k = 10;
> i = sub ();
> }
>
> return k;
> }
>
> where it did not previously do so. In particular, the compiler again
> complains that k might be used uninitialized.
>
> I am not planning on investigating this regression further.
Well, OK, but this suggests that the optimizer is now stupider than
it used to be. It no longer seems to recognize that k is a loop
invariant. This may mean that the compiler will produce worse
code than before.
So the warning regression may be a symptom of possible pessimization.