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

--- Comment #7 from David Malcolm <dmalcolm at gcc dot gnu.org> ---
(In reply to Martin Liška from comment #4)
Thanks; that seems to a slightly different issue, but we may as well keep this
bug open for tracking it.

Am investigating.

It appears to be here, within maybe_unwind_expanded_macro_loc:
212             source_location resolved_exp_loc =
213               linemap_resolve_location (line_table,
214                                         MACRO_MAP_EXPANSION_POINT_LOCATION
(iter->map),
215                                         LRK_MACRO_DEFINITION_LOCATION,
NULL);

where:

MACRO_MAP_EXPANSION_POINT_LOCATION (iter->map) is 0x80000001:

(gdb) call inform (0x80000001, "")
tc.cpp:2:1: note: 
 MOZALLOC_THROW_BAD_ALLOC_IF_HAS_EXCEPTIONS
 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

but resolved_exp_loc is 164736:

(gdb) call inform (164736, "")
tc.cpp:2:1: note: 
 MOZALLOC_THROW_BAD_ALLOC_IF_HAS_EXCEPTIONS
 ^

so the call to linemap_resolve_location seems to be stripping off the range
information.

Reply via email to