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

--- Comment #12 from David Malcolm <dmalcolm at gcc dot gnu.org> ---
(In reply to Manuel López-Ibáñez from comment #11)
> (In reply to Markus Trippelsdorf from comment #6)
> > Bingo! With both files present I can even reproduce it on my x86_64 machine.
> 
> Unfortunately, I cannot reproduce it with r230753, so it seems quite a
> recent regression. (something is broken in the machine of the compile farm
> that I use for development and I cannot build a more recent GCC).
> 
> If you want to investigate further, add a breakpoint just before calling 
> linemap_position_for_loc_and_offset(), figure out if the arguments passed
> make sense and if they do, why the corresponding assert is triggering.
> 
> The assert triggering is one of these two:
> 
>   if (linemap_assert_fails (r <= set->highest_location)
>       || linemap_assert_fails (map == linemap_lookup (set, r)))

I'm able to reproduce it (e.g. with r233722) by copying attachment 37812 to
"t.c", and then copying attachment 37813 to "cmds-check.c" in the same dir, and
running:
  ./xgcc -B. -c t.c -Wformat
from that dir.

(gdb) p /x r
$2 = 0x5daef40
(gdb) p /x set->highest_location
$3 = 0x5dc71a0
(gdb) p r <= set->highest_location
$4 = true
(gdb) p map
$5 = (const line_map_ordinary *) 0x7ffff15baf20
(gdb) call linemap_lookup (set, r)
$6 = (const line_map *) 0x7ffff15baf40
(gdb) p (map == linemap_lookup (set, r))
$7 = false

i.e. it's the 2nd conditional that's failing.

Reply via email to