This is the mail archive of the 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...?

Yes, I certainly will.  

Is there any pragma or the like to disable gcc optimizations around a
certain part of a file?  Trying to get around this is taking way too
long :).


On Thu, 2004-06-03 at 19:59, Ian Lance Taylor wrote:
> Adrian Bentley <> 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
> Thanks.
> Ian

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