This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug preprocessor/69650] [6 Regression] ICE in linemap_line_start, at libcpp/line-map.c:803


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

--- Comment #19 from Manuel LÃpez-IbÃÃez <manu at gcc dot gnu.org> ---
(In reply to Richard Biener from comment #17)
> "caused" by r44789 which introduced this path (initially with error ||
> to_file == NULL) with a description of just
> 
>        (add_line_map): Return pointer to const.  When passed NULL to_file
>         with LC_LEAVE, use the obvious values for the return point so the
>         caller doesn't have to figure them out.
> 
> I will test the change.

I'm not sure what this change ends up creating in the line-table. You may end
up creating just a different kind of invalid line-table. If it creates a
LC_LEAVE or a LC_RENAME with to_file==NULL or to_line==0, that seems broken in
just a different way. A LC_RENAME with to_file=="Unified_cpp_js_src35.ii" and
to_line==2 would be ok (just useless, because we are basically creating a new
map to say: we are at the same file at the same line as before).

Also, it may work for this case, since we are returning to the main file and
the main file info was ok. I'm not sure what will happen when there are several
included files (that is, the other branch that can set error == true).

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]