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

--- Comment #15 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
(In reply to Manuel López-Ibáñez from comment #14)
> (In reply to rguent...@suse.de from comment #12)
> > > This is an invalid linemarker. libcpp should ignore it completely and 
> > > behave as
> > > if it was not present. It seems it is not doing that for some reason and 
> > > that
> > > is messing up the line-table.
> > 
> > Sure, but I don't see that 1048539 line number anywhere so it feels like
> > sth is used uninitialized?
> 
> This was thoroughly analyzed by David above. The invalid linemarker causes
> an invalid LC_LEAVE which then triggers an invalid line-number calculation.
> Somehow, the code for handling the invalid linemarker is doing the wrong
> thing.

In any case, the current error-handling creates:

{<line_map> = {start_location = 8224, reason = LC_LEAVE}, to_file = 0x2154630
"Unified_cpp_js_src35.ii", to_line = 1048576, included_from = -1, sysp = 0
'\000', m_column_and_range_bits = 12, m_range_bits = 5}

in response to the invalid line-marker. Even if the to_line was correct, the
linemarker was invalid, so this map does not even need to exist. The line-table
at the end should be the same as if the original file had '//' in front of #.

Reply via email to