http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53770

--- Comment #1 from petschy at gmail dot com 2012-06-25 20:29:05 UTC ---
I tested on 32bit Debian Wheezy, too, with stock 4.6.3, and everything was ok.

Another AMD64 Wheezy box w/ stock 4.6.3 showed the bug, with a minor variation:
when the condition in line 25 was true, it stepped on the break at line 26, but
then also stepped on line 30 with the ++f. The same is for 4.7.0.

Looking at the disassembly when standing on ++f:
   0x0000000000400a99 <+234>:    nop
=> 0x0000000000400a9a <+235>:    jmp    0x400aa0 <do_print<char>(char*,
unsigned long, char const*)+241>
   0x0000000000400a9c <+237>:    addl   $0x1,-0x14(%rbp)

The last insn is ++f, and the jump should belong to the break I guess.

Reply via email to