https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93954
--- Comment #2 from Qirun Zhang <qrzhang at gatech dot edu> --- (In reply to Andrew Pinski from comment #1) > >Bisection points to g:bd2b9f1e2d67ec8e88c977154ecfee > > My bet is if you put a break point at "i--;" you would get the incorrect > answer before that patch. > Since the function just has one instruction at -O3, there is not an > instruction to place both lines there. Break at "i--;" (at line 3) does give the same incorrect result. However, before that patch, gcc works fine. I tested g:6d3aa24cd6535dcfc9f0701579eca53aa1917 It gives me: $ bin/bin/gcc -g -O3 abc.c $ gdb -x cmds -batch a.out Breakpoint 1 at 0x4003a0: file abc.c, line 3. Breakpoint 1, main () at abc.c:4 4 ;// b here $1 = 2580636199 Kill the program being debugged? (y or n) [answered Y; input not from terminal] [Inferior 1 (process 19052) killed]