[Bug preprocessor/96940] ICE in linemap_compare_locations, at libcpp/line-map.c:1359
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96940 David Malcolm changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED CC||dmalcolm at gcc dot gnu.org Resolution|--- |DUPLICATE --- Comment #3 from David Malcolm --- This does indeed look like a duplicate of bug 96391; note the missing column number, and the two declspecs in different macros here: /x/bcm_sdk/sdk/include/shared/bitop.h:73: internal compiler error: in linemap_compare_locations, at libcpp/line-map.c:1359 73 | CONST SHR_BITDCL *c, | *** This bug has been marked as a duplicate of bug 96391 ***
[Bug preprocessor/96940] ICE in linemap_compare_locations, at libcpp/line-map.c:1359
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96940 --- Comment #2 from Jan Smets --- This is the workaround I currently have. It avoids calling min_location(). diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index 90111e4c786..f49019e81d0 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -11005,8 +11005,11 @@ grokdeclarator (const cp_declarator *declarator, if (initialized > 1) funcdef_flag = true; - location_t typespec_loc = smallest_type_location (type_quals, + location_t typespec_loc = smallest_type_quals_location (type_quals, declspecs->locations); + // using smallest_type_quals_location() iso. smallest_type_quals_location() + // basically removes the usage of min_location on the result of smallest_type_quals_location(). + // typespec_loc = min_location (typespec_loc, declspecs->locations[ds_type_spec]); if (typespec_loc == UNKNOWN_LOCATION) typespec_loc = input_location;
[Bug preprocessor/96940] ICE in linemap_compare_locations, at libcpp/line-map.c:1359
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96940 --- Comment #1 from Jan Smets --- Likely duplicate of Bug 96391 (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96391) That one has a testcase for i686-w64-mingw32