This is the mail archive of the gcc-help@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]
Other format: [Raw text]

Re: Weird optimization bug...?


Adrian Bentley <adruab@voria.com> writes:

> And I'm indirecting off of iter which is being incremented every
> iteration.  But for some reason it looks like gcc decided to use the
> original value of iter for the 10th iteration (1 greater than the value
> for length my example is using) inside the sample case I have... (i.e.
> rather than using the incremented value).  So it looks like it was
> trying to optimize out an expression that wasn't constant (either in
> attempting to optimize the first if statement out of the loop).  It
> doesn't do this when I turn optimization off... so it definitely looks
> like an optimizer bug.
> 
> Anyways, I'm not sure why it would do this as iter is being changed
> every iteration.  Oh well, I'm gonna manually do some unrolling and
> hopefully it won't break any more.  Hope that helps anyone interested in
> the issue.

If you have time, please submit a bug report.  See
    http://gcc.gnu.org/bugs.html

Thanks.

Ian


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