[Top][All Lists]
[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: |
Dmitry K. |
Subject: |
Re: [avr-gcc-list] Endless loop: uchar c; for (c=1; c; c++) |
Date: |
Fri, 9 Mar 2007 08:21:12 +1000 |
User-agent: |
KMail/1.5 |
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
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).
Dmitry.
- RE: [avr-gcc-list] Endless loop: uchar c; for (c=1; c; c++), (continued)
Re: [avr-gcc-list] Endless loop: uchar c; for (c=1; c; c++), Shaun Jackman, 2007/03/07