From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id A0C1E38618FF; Wed, 10 Feb 2021 15:05:22 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A0C1E38618FF From: "dmalcolm at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug preprocessor/96391] [10/11 Regression] internal compiler error: in linemap_compare_locations, at libcpp/line-map.c:1359 Date: Wed, 10 Feb 2021 15:05:22 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: preprocessor X-Bugzilla-Version: 10.2.1 X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: dmalcolm at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 10.3 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Feb 2021 15:05:22 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D96391 --- Comment #15 from David Malcolm --- #0 fancy_abort (file=3D0x95b0ab6 "../../libcpp/line-map.c", line=3D1359, function=3D0x95b0ace "linemap_compare_locations") at ../../gcc/diagnostic.c:1778 #1 0x08fcbecf in linemap_compare_locations (set=3D0xf7ffb000, pre=3D214678= 2942, post=3D) at ../../libcpp/line-map.c:1359 #2 0x080f4378 in linemap_location_before_p (loc_b=3D2146782943, loc_a=3D2146782942, set=3D) at ../../gcc/../libcpp/include/line-map.h:1247 #3 min_location (locb=3D2146782942, loca=3D2146782943) at ../../gcc/cp/decl.c:10641 #4 smallest_type_location (type_quals=3Dtype_quals@entry=3D1, locations=3Dlocations@entry=3D0xffffc778) at ../../gcc/cp/decl.c:10673 #5 0x081024bb in grokdeclarator (declarator=3D0xa03c950, declspecs=3D0xfff= fc778, decl_context=3DNORMAL, initialized=3D0, attrlist=3D0xffffc62c) at ../../gcc/cp/decl.c:11008 #6 0x0810a109 in start_decl (declarator=3D0xa03c950, declspecs=3D0xffffc77= 8, initialized=3D0, attributes=3D, prefix_attributes=3D0x0,=20 pushed_scope_p=3D0xffffc68c) at ../../gcc/cp/decl.c:5226 #7 0x0818face in cp_parser_init_declarator (parser=3D0xec83dae0, flags=3D, decl_specifiers=3D0xffffc778, checks=3D0x0,=20 function_definition_allowed_p=3Dtrue, member_p=3Dfalse, declares_class_or_enum=3D0, function_definition_p=3D0xffffc71c, maybe_range_for_decl=3D0x0,=20 init_loc=3D0xffffc710, auto_result=3D0xffffc7fc) at ../../gcc/cp/parser= .c:20776 #8 0x08172e04 in cp_parser_simple_declaration (parser=3D0xec83dae0, function_definition_allowed_p=3D, maybe_range_for_decl=3D0x0) at ../../gcc/cp/parser.c:13739 #9 0x08198e6a in cp_parser_declaration (parser=3D0xec83dae0) at ../../gcc/cp/parser.c:13438 #10 0x081998cb in cp_parser_declaration_seq_opt (parser=3D) = at ../../gcc/cp/parser.c:13314 #11 cp_parser_linkage_specification (parser=3D0xec83dae0) at ../../gcc/cp/parser.c:14632 #12 0x08198ed2 in cp_parser_declaration (parser=3D0xec83dae0) at ../../gcc/cp/parser.c:13375 #13 0x081995b6 in cp_parser_translation_unit (parser=3D0xec83dae0) at ../../gcc/cp/parser.c:4734 #14 c_parse_file () at ../../gcc/cp/parser.c:44001 #15 0x0825a13c in c_common_parse_file () at ../../gcc/c-family/c-opts.c:1190 #16 0x086be8ce in compile_file () at ../../gcc/toplev.c:458 #17 0x0809227d in do_compile () at ../../gcc/toplev.c:2298 #18 toplev::main (this=3D0xffffca4e, argc=3D120, argv=3D0xffffcb24) at ../../gcc/toplev.c:2437 #19 0x08096231 in main (argc=3D120, argv=3D0xffffcb24) at ../../gcc/main.c:= 39 It's hitting the abort at line 1359 within linemap_compare_locations: 1350 /* So pre and post represent two tokens that are present in a 1351 same macro expansion. Let's see if the token for pre was 1352 before the token for post in that expansion. */ 1353 unsigned i0, i1; 1354 const struct line_map *map =3D 1355 first_map_in_common (set, pre, post, &l0, &l1); 1356=20=20=20=20 1357 if (map =3D=3D NULL) 1358 /* This should not be possible. */ 1359 abort (); where: (gdb) p /x loc_a $1 =3D 0x7ff54ede (gdb) p /x loc_b $2 =3D 0x7ff54edf (gdb) call inform (loc_a, "loc_a") In file included from /usr/i686-w64-mingw32/sys-root/mingw/include/minwindef.h:163, from /usr/i686-w64-mingw32/sys-root/mingw/include/windef.h= :8, from /usr/i686-w64-mingw32/sys-root/mingw/include/windows.h:69, from /builddir/build/BUILD/wine-gecko-2.47.1/wine-gecko-2.47.1/widget/windows/Au= dioSession.cpp:7, from /builddir/build/BUILD/wine-gecko-2.47.1/wine-gecko-2.47.1-x86/widget/window= s/Unified_cpp_widget_windows0.cpp:2: /usr/i686-w64-mingw32/sys-root/mingw/include/cfgmgr32.h: At global scope: /usr/i686-w64-mingw32/sys-root/mingw/include/cfgmgr32.h:19: note: loc_a 19 | typedef CONST VOID *PCVOID; |=20 (gdb) call inform (loc_b, "loc_b") In file included from /usr/i686-w64-mingw32/sys-root/mingw/include/windef.h= :8, from /usr/i686-w64-mingw32/sys-root/mingw/include/windows.h:69, from /builddir/build/BUILD/wine-gecko-2.47.1/wine-gecko-2.47.1/widget/windows/Au= dioSession.cpp:7, from /builddir/build/BUILD/wine-gecko-2.47.1/wine-gecko-2.47.1-x86/widget/window= s/Unified_cpp_widget_windows0.cpp:2: /usr/i686-w64-mingw32/sys-root/mingw/include/cfgmgr32.h:19: note: loc_b 19 | typedef CONST VOID *PCVOID; |=