This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/70264] [6 Regression] ICE at -O0 to -O3 in both 32-bit and 64-bit modes on x86_64-linux-gnu (compatible_locations_p, at diagnostic-show-locus.c:490)
- From: "dmalcolm at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 17 Mar 2016 18:28:19 +0000
- Subject: [Bug c/70264] [6 Regression] ICE at -O0 to -O3 in both 32-bit and 64-bit modes on x86_64-linux-gnu (compatible_locations_p, at diagnostic-show-locus.c:490)
- Auto-submitted: auto-generated
- References: <bug-70264-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70264
--- Comment #3 from David Malcolm <dmalcolm at gcc dot gnu.org> ---
Author: dmalcolm
Date: Thu Mar 17 18:27:47 2016
New Revision: 234303
URL: https://gcc.gnu.org/viewcvs?rev=234303&root=gcc&view=rev
Log:
PR c/70264: fix crash in compatible_locations_p with BUILTINS_LOCATION
In r234088 my fix for PR c++/70105 didn't allow for the possibility that
when comparing a pair of macro expansion histories that one of the
macros in the history might not be located within a line-map, and
PR c/70264 reports a crash due to encountering BUILTINS_LOCATION within
the traversal.
Fixed thusly.
Successfully bootstrapped on x86_64-pc-linux-gnu; adds 4 PASS results
to gcc.sum and 12 to g++.sum.
gcc/ChangeLog:
PR c/70264
* diagnostic-show-locus.c (compatible_locations_p): Handle the case
where one or both locations aren't within a line_map.
gcc/testsuite/ChangeLog:
PR c/70264
* c-c++-common/pr70264.c: New test case.
Added:
trunk/gcc/testsuite/c-c++-common/pr70264.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/diagnostic-show-locus.c
trunk/gcc/testsuite/ChangeLog