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

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

RE: [avr-gcc-list] Endless loop: uchar c; for (c=1; c; c++)


From: Eric Weddington
Subject: RE: [avr-gcc-list] Endless loop: uchar c; for (c=1; c; c++)
Date: Thu, 08 Mar 2007 16:29:35 -0700

 

> -----Original Message-----
> From: 
> address@hidden 
> [mailto:address@hidden
> org] On Behalf Of Dmitry K.
> Sent: Thursday, March 08, 2007 3:21 PM
> To: address@hidden
> Subject: Re: [avr-gcc-list] Endless loop: uchar c; for (c=1; c; c++)
> 
> On Thursday 08 March 2007 09:41, Shaun Jackman wrote:
> > On 3/7/07, Eric Weddington <address@hidden> wrote:
> > > Hi Shaun,
> > >
> > > Thanks a lot for doing the leg work on this!
> > >
> > > But I have a favor to ask: Can you find out approximately 
> *when* this got
> > > fixed? i.e., can you test 4.1.2, and the current 4.2.x 
> branch to see if
> > > it's fixed at either of those two points?
> 
> Hi.
> 
> Avr-gcc 4.1.2 is correct.
> 
> Possible, this is the GCC bug #28386: "Wrong code with
> if condition in loop", opened at Jul 2006.
> It was fixed at Sep 2006.
> See: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28386

Thanks for finding that! I see that it's not an avr-specific bug. That's why
I wasn't familiar with it as it's not in the list that I keep track of.
 
> I have try the file of this bug from GCC testsuite: 20060905-1.c
> Avr-gcc 4.1.1 (pure release) gives incorrect result. More,
> this result is depended of RAM start address, i.e. it may
> be different for different chips.
> Avr-gcc 4.1.2 gives correct code (although not the smallest).

Well that's great that it's fixed in 4.1.2. The next version of WinAVR will
include 4.1.2 (btw, I'm aiming for sometime in April). Yes, avr-gcc could
always more help in optimization, but at least it's correct.

Thanks, again
Eric





reply via email to

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