https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90886

--- Comment #3 from Joe <joe at freakyacres dot com> ---
Changing i to 127 produces following assembly...

volatile unsigned char x;

int main() {
  while (1) {
    for (unsigned char i = 0 ; i < 127 ; i++) {
      x = i;
    }
  }
}

00000090 <main>:
  90:   80 e0           ldi     r24, 0x00       ; 0
  92:   80 93 00 01     sts     0x0100, r24     ; 0x800100 <_edata>
  96:   8f 5f           subi    r24, 0xFF       ; 255
  98:   8f 37           cpi     r24, 0x7F       ; 127
  9a:   d1 f3           breq    .-12            ; 0x90 <main>
  9c:   fa cf           rjmp    .-12            ; 0x92 <main+0x2>

0000009e <_exit>:
  9e:   f8 94           cli

000000a0 <__stop_program>:
  a0:   ff cf           rjmp    .-2             ; 0xa0 <__stop_program>

Reply via email to