https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78569
--- Comment #5 from David Malcolm <dmalcolm at gcc dot gnu.org> --- Author: dmalcolm Date: Wed Nov 30 01:13:37 2016 New Revision: 242990 URL: https://gcc.gnu.org/viewcvs?rev=242990&root=gcc&view=rev Log: substring locations and # line directives (PR preprocessor/78569) The ICE in PR preprocessor/78569 appears to be due to an attempt to generate substring locations in a .i file where the underlying .c file has changed since the .i file was generated. This can't work, so it seems safest for the on-demand substring locations to be unavailable for such files, falling back to "whole string" locations for such cases. gcc/ChangeLog: PR preprocessor/78569 * input.c (get_substring_ranges_for_loc): Fail gracefully if line directives were present. gcc/testsuite/ChangeLog: PR preprocessor/78569 * gcc.dg/format/pr78569.c: New test case. Added: trunk/gcc/testsuite/gcc.dg/format/pr78569.c Modified: trunk/gcc/ChangeLog trunk/gcc/input.c trunk/gcc/testsuite/ChangeLog