avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-gcc-list] Extremly confusing behaviour... (Suspect compiler?, o


From: Mike Panetta
Subject: Re: [avr-gcc-list] Extremly confusing behaviour... (Suspect compiler?, optimization error?)
Date: 14 May 2003 13:27:33 -0400

I have tried -O3, and -Os both of which show the problem.  I have also
tried -O0 which does not have the problem.

I can provide asm listings, should I post them to the list as
attachments?  What optimization levels would you want to see?

I can just cut and paste the listing snippet of the do {} while(); loop
if thats all you need.

Mike

PS I revise my comment about assigning any variable equal to retval.  It
did not actually fix the problem.  It was something else.  However,
casting the variable to an int8_t in the while (retval != 2) bit does
fix the problem.

On Wed, 2003-05-14 at 12:43, E. Weddington wrote:
> On 14 May 2003 at 12:32, Mike Panetta wrote:
> 
>  
> > PS: Not only will putting a printf in the do {} while(retval !=2);
> > loop make it work, but assigning ANY variable to be equal to retval
> > will make it work.  I think its a compiler optimization error.
> > 
> 
> 1. What's your optimization level?
> 2. Can you provide listings with and without optimization of the 
> offending code?
> 
> Eric
> 
> _______________________________________________
> avr-gcc-list mailing list
> address@hidden
> http://www.avr1.org/mailman/listinfo/avr-gcc-list




reply via email to

[Prev in Thread] Current Thread [Next in Thread]