[Bug target/77353] [AVR] uint16_t instead uint8_t comparison
bseifert at gmx dot at
gcc-bugzilla@gcc.gnu.org
Tue Aug 23 18:51:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77353
--- Comment #1 from Berni <bseifert at gmx dot at> ---
another example:
if (PINA < PINC)
{
PORTB = 0;
}
compiles to:
6c2: 20 b1 in r18, 0x00 ; 0
6c4: 86 b1 in r24, 0x06 ; 6
6c6: 30 e0 ldi r19, 0x00 ; 0
6c8: 90 e0 ldi r25, 0x00 ; 0
6ca: 28 17 cp r18, r24
6cc: 39 07 cpc r19, r25
6ce: 0c f4 brge .+2 ; 0x6d2 <main+0x10>
6d0: 15 b8 out 0x05, r1 ; 5
two 8 bit registers are compared as uint16_t!
More information about the Gcc-bugs
mailing list