This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Warning regression with COMPARE fixes


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.



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]