------- Comment #12 from ebotcazou at gcc dot gnu dot org 2006-01-18 13:31 ------- > I rebuilt with -O2 AND -g, and got the following trace. Notice the while-loop > in nscan, statements 1141 thru 1147 are four single statements. The "next" > trace by gdb shows them occuring multiple times. This should NOT be > happening. This may be another BUG, this time with 'gdb'.
That is expected because -O2 seriously breaks the source code apart and reorders things. Use "nexti" in that case. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25791