[Bug preprocessor/78680] [7 Regression] ICE in get_substring_ranges_for_loc, at input.c:1398

msebor at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Dec 6 17:19:00 GMT 2016


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

--- Comment #3 from Martin Sebor <msebor at gcc dot gnu.org> ---
The failed assertion in get_substring_ranges_for_loc:

  gcc_assert (line_width >= (start.column - 1 + literal_length));

suggests that the code assumes the entire literal is on the same line (i.e.,
contains no escaped newlines).  Removing the assertion avoids the ICE but I'm
not familiar enough with the code to even guess if that's a viable fix or if it
would just delay the symptom of the bug.  David will know for sure.


More information about the Gcc-bugs mailing list