|
From: | Peter Bosscha |
Subject: | [avr-gcc-list] avr-gcc bug (Win) |
Date: | Tue, 27 Feb 2001 17:39:23 +0200 |
Hi,
Found a bug in branch logic together with the BRGE instruction.
I'm using avr-libc-20010211 and -O2 and -Os give the same (erroneous)
result.
Tried to simplify this as much as possible so the code is a
joke. Have a look at the following:
unsigned char mycall(unsigned char parm)
{ return 0x80; } int main(void)
{ unsigned char i,a,b; a=mycall(0);
b=mycall(1); do { if (a) { i = mycall(0); if (i & 0x80) { mycall(1); } else { if (b) { mycall(2); } } } } while(1); return 1; } In this example the jump at if (i & 0x80) goes the wrong way.
- Change the statement to if (i) and the problem goes away
- Change the nesting level (comment out the outer do-while) and the problem
goes away
- Take out the if (b) and the problem goes away
Changing the outer while into for(;;) does not help either.
So ... 2 questions:
- is everyone else getting this too ?
- if so, where to report this ?
Greetings
Peter Bosscha
P.S. The Mime bit is not my idea, talk to my Sysadmin if you don't like
it..
|
[Prev in Thread] | Current Thread | [Next in Thread] |