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

--- Comment #3 from Qirun Zhang <qrzhang at gatech dot edu> ---
(In reply to Alexandre Oliva from comment #2)
> This odd behavior is an artifact of the way GCC lays out the basic blocks,
> and how GDB interprets the line number program.
> 
> The blocks containing the conditional calls to optimize_me_not in line 15
> are moved to the end of the function, in reverse order, while the rest of
> the inner loop, with code from lines 12 to 14, remains in sequential order.
> 
> What GDB sees then is a long chunk of code all at line 15, the first of
> which corresponds to the iteration l=8.  l=7 is later, with another line
> number mark, then l=6 and so on, but without intervening line number
> changes, it takes it all as a single line.  GDB pays no attention to the
> is_stmt=1 markers at each and every one of them, let alone to the different
> view numbers.
> 
> So, yeah, definitely consumer issue.

Hi Alex,

Are you suggesting that it's a gdb bug? Perhaps, I can report it to gdb
instead? Thanks.

Reply via email to