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 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)


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

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