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

--- Comment #4 from Yibiao Yang <yangyibiao at nju dot edu.cn> ---
(In reply to Jonathan Wakely from comment #3)
> Putting "[gdb]" in the bug summary suggests you're trying to report a GDB
> bug, which doesn't belong here.
> 
> You're trying to put a breakpoint on a line with no code, which won't work.
> Try breaking on line 12.

Thanks. 
Indeed, as you said, I would probably agree that this is a bug in gdb. In fact,
we can set breakpoint at the label statement (Line 13) as follows. The behavior
of gdb is correct in this case. Thus, this problem should not be caused by "a
line with no code".

$ cat small.c
#include <stdio.h>
int main()
{
  int i = 0;
  int j = 0;
  for (; i<=1; i++) {
    for (; j<=1; j++) {
      goto lbl;
    }
  }

  printf("hello\n");
lbl:  // line 13
  return 0;
}

Reply via email to