public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "asolokha at gmx dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug preprocessor/97577] New: [11 Regression] ICE: Segmentation fault (in get_location_from_adhoc_loc) Date: Mon, 26 Oct 2020 08:37:17 +0000 [thread overview] Message-ID: <bug-97577-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97577 Bug ID: 97577 Summary: [11 Regression] ICE: Segmentation fault (in get_location_from_adhoc_loc) Product: gcc Version: 11.0 Status: UNCONFIRMED Keywords: error-recovery, ice-on-invalid-code Severity: normal Priority: P3 Component: preprocessor Assignee: unassigned at gcc dot gnu.org Reporter: asolokha at gmx dot com Target Milestone: --- gcc-11.0.0-alpha20201025 snapshot (g:308e40331f9d2820f8286769b5fc764671187364) ICEs when compiling the following testcase, reduced from test/Preprocessor/annotate_in_macro_arg.c from the clang 10.0.1 test suite: #define M1() M1( #if M1() #endif #pragma pack() % MALLOC_PERTURB_=1 MALLOC_CHECK_=3 gcc-11.0.0 -c ifhvkm83.c ifhvkm83.c:5:9: error: #if with no expression 5 | #if M1() | ^ ifhvkm83.c:7:9: internal compiler error: Segmentation fault 7 | #pragma pack() | ^~~~ 0xdbaf3f crash_signal /var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201025/work/gcc-11-20201025/gcc/toplev.c:330 0x192e151 get_location_from_adhoc_loc(line_maps const*, unsigned int) /var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201025/work/gcc-11-20201025/libcpp/line-map.c:257 0x192e151 linemap_resolve_location(line_maps*, unsigned int, location_resolution_kind, line_map_ordinary const**) /var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201025/work/gcc-11-20201025/libcpp/line-map.c:1540 0x18e8933 diagnostic_report_current_module(diagnostic_context*, unsigned int) /var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201025/work/gcc-11-20201025/gcc/diagnostic.c:683 0xe15071 diagnostic_report_current_function(diagnostic_context*, diagnostic_info*) /var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201025/work/gcc-11-20201025/gcc/tree-diagnostic.c:39 0xe150d0 default_tree_diagnostic_starter /var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201025/work/gcc-11-20201025/gcc/tree-diagnostic.c:48 0x18e6a27 diagnostic_report_diagnostic(diagnostic_context*, diagnostic_info*) /var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201025/work/gcc-11-20201025/gcc/diagnostic.c:1206 0x885aaa c_cpp_diagnostic(cpp_reader*, cpp_diagnostic_level, cpp_warning_reason, rich_location*, char const*, __va_list_tag (*) [1]) /var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201025/work/gcc-11-20201025/gcc/c-family/c-common.c:6364 0x191df49 cpp_diagnostic_at /var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201025/work/gcc-11-20201025/libcpp/errors.c:42 0x191df49 cpp_diagnostic /var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201025/work/gcc-11-20201025/libcpp/errors.c:75 0x191e06e cpp_error(cpp_reader*, cpp_diagnostic_level, char const*, ...) /var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201025/work/gcc-11-20201025/libcpp/errors.c:89 0x1931f58 collect_args /var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201025/work/gcc-11-20201025/libcpp/macro.c:1267 0x1931f58 funlike_invocation_p /var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201025/work/gcc-11-20201025/libcpp/macro.c:1326 0x1931f58 enter_macro_context /var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201025/work/gcc-11-20201025/libcpp/macro.c:1401 0x19326e2 cpp_get_token_1 /var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201025/work/gcc-11-20201025/libcpp/macro.c:2890 0x89fe80 c_lex_with_flags(tree_node**, unsigned int*, unsigned char*, int) /var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201025/work/gcc-11-20201025/gcc/c-family/c-lex.c:457 0x81d67a c_lex_one_token /var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201025/work/gcc-11-20201025/gcc/c/c-parser.c:279 0x85005a c_parser_peek_token(c_parser*) /var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201025/work/gcc-11-20201025/gcc/c/c-parser.c:483 0x85005a c_parse_file() /var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201025/work/gcc-11-20201025/gcc/c/c-parser.c:21819 0x8abe2d c_common_parse_file() /var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201025/work/gcc-11-20201025/gcc/c-family/c-opts.c:1188 I've failed to reproduce it w/ valgrind so far.
next reply other threads:[~2020-10-26 8:37 UTC|newest] Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-10-26 8:37 asolokha at gmx dot com [this message] 2020-10-26 12:36 ` [Bug preprocessor/97577] " rguenth at gcc dot gnu.org 2020-11-21 5:15 ` asolokha at gmx dot com 2020-11-21 15:04 ` [Bug preprocessor/97577] [11 Regression] ICE: Segmentation fault (in get_location_from_adhoc_loc) by r11-4128 hjl.tools at gmail dot com 2021-01-14 9:31 ` rguenth at gcc dot gnu.org 2021-04-27 11:39 ` [Bug preprocessor/97577] [11/12 " jakub at gcc dot gnu.org 2021-05-04 12:32 ` rguenth at gcc dot gnu.org 2021-07-05 10:23 ` asolokha at gmx dot com 2021-07-28 7:05 ` rguenth at gcc dot gnu.org 2022-04-21 7:48 ` rguenth at gcc dot gnu.org 2023-05-29 10:03 ` [Bug preprocessor/97577] [11/12/13/14 " jakub at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-97577-4@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).