From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 3361F398FC3B; Tue, 1 Jun 2021 13:53:39 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3361F398FC3B From: "marxin at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/100643] [11/12 Regression] ICE in ix86_mangle_function_version_assembler_name, at config/i386/i386-features.c:2809 since r11-7693-g1c7bec8bfbc5457c Date: Tue, 01 Jun 2021 13:53:38 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 12.0 X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: marxin at gcc dot gnu.org X-Bugzilla-Status: WAITING X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: marxin at gcc dot gnu.org X-Bugzilla-Target-Milestone: 11.2 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_status everconfirmed cf_reconfirmed_on cc 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: Tue, 01 Jun 2021 13:53:39 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D100643 Martin Li=C5=A1ka changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |WAITING Ever confirmed|0 |1 Last reconfirmed| |2021-06-01 CC| |jason at gcc dot gnu.org --- Comment #2 from Martin Li=C5=A1ka --- Slightly clean up test-case: $ cat pr100643.c int foo() { int foo(void) __attribute__((target("avx"))); int foo(void) __attribute__((target("default"))); return 123; } $ g++ pr100643.c -c pr100643.c:7:1: internal compiler error: in ix86_mangle_function_version_assembler_name, at config/i386/i386-features.c:2809 7 | } | ^ 0x8b6dba ix86_mangle_function_version_assembler_name /home/marxin/Programming/gcc/gcc/config/i386/i386-features.c:2809 0x8b6dba ix86_mangle_decl_assembler_name(tree_node*, tree_node*) /home/marxin/Programming/gcc/gcc/config/i386/i386-features.c:2839 0xa671bf get_mangled_id /home/marxin/Programming/gcc/gcc/cp/mangle.c:4041 0xa671bf mangle_decl(tree_node*) /home/marxin/Programming/gcc/gcc/cp/mangle.c:4078 0x147028c decl_assembler_name(tree_node*) /home/marxin/Programming/gcc/gcc/tree.c:711 0x14ca040 notice_global_symbol(tree_node*) /home/marxin/Programming/gcc/gcc/varasm.c:1801 0xd18798 cgraph_node::finalize_function(tree_node*, bool) /home/marxin/Programming/gcc/gcc/cgraphunit.c:453 0xb9241e expand_or_defer_fn(tree_node*) /home/marxin/Programming/gcc/gcc/cp/semantics.c:4681 0xb0b138 cp_parser_function_definition_after_declarator /home/marxin/Programming/gcc/gcc/cp/parser.c:30157 0xb0c59d cp_parser_function_definition_from_specifiers_and_declarator /home/marxin/Programming/gcc/gcc/cp/parser.c:30060 0xb0c59d cp_parser_init_declarator /home/marxin/Programming/gcc/gcc/cp/parser.c:21706 0xae711c cp_parser_simple_declaration /home/marxin/Programming/gcc/gcc/cp/parser.c:14487 0xb15be4 cp_parser_declaration /home/marxin/Programming/gcc/gcc/cp/parser.c:14184 0xb1675c cp_parser_toplevel_declaration /home/marxin/Programming/gcc/gcc/cp/parser.c:14213 0xb1675c cp_parser_translation_unit /home/marxin/Programming/gcc/gcc/cp/parser.c:4942 0xb1675c c_parse_file() /home/marxin/Programming/gcc/gcc/cp/parser.c:45508 0xc4b2d9 c_common_parse_file() /home/marxin/Programming/gcc/gcc/c-family/c-opts.c:1219 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See for instructions. Where we ICE because the top-level function definition has DECL_FUNCTION_VERSIONED (decl) set, but it does not contain "target" attrib= ute. @Jason: Is it really a valid test-case?=