This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/77353] [AVR] uint16_t instead uint8_t comparison
- From: "bseifert at gmx dot at" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 23 Aug 2016 18:51:08 +0000
- Subject: [Bug target/77353] [AVR] uint16_t instead uint8_t comparison
- Auto-submitted: auto-generated
- References: <bug-77353-4@http.gcc.gnu.org/bugzilla/>
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!