https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100643
Bug ID: 100643
Summary: [11/12 Regression] ICE in
ix86_mangle_function_version_assembler_name, at
config/i386/i386-features.c:2809
Product: gcc
Version: 12.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: [email protected]
Target Milestone: ---
Changed between 20210314 and 20210328 :
$ cat z1.cc
int foo()
{
int foo() __attribute__((target("avx")));
int foo() __attribute__((target("default")));
}
$ g++-12-20210516 -c z1.cc
z1.cc: In function 'int foo()':
z1.cc:3:10: warning: empty parentheses were disambiguated as a function
declaration [-Wvexing-parse]
3 | int foo() __attribute__((target("avx")));
| ^~
z1.cc:3:10: note: remove parentheses to default-initialize a variable
3 | int foo() __attribute__((target("avx")));
| ^~
| --
z1.cc:3:10: note: or replace parentheses with braces to value-initialize a
variable
z1.cc:4:10: warning: empty parentheses were disambiguated as a function
declaration [-Wvexing-parse]
4 | int foo() __attribute__((target("default")));
| ^~
z1.cc:4:10: note: remove parentheses to default-initialize a variable
4 | int foo() __attribute__((target("default")));
| ^~
| --
z1.cc:4:10: note: or replace parentheses with braces to value-initialize a
variable
z1.cc:5:1: warning: no return statement in function returning non-void
[-Wreturn-type]
5 | }
| ^
z1.cc: At global scope:
z1.cc:5:1: internal compiler error: in
ix86_mangle_function_version_assembler_name, at
config/i386/i386-features.c:2809
0x107d5bb ix86_mangle_function_version_assembler_name
../../gcc/config/i386/i386-features.c:2809
0x107d5bb ix86_mangle_decl_assembler_name(tree_node*, tree_node*)
../../gcc/config/i386/i386-features.c:2839
0x719887 get_mangled_id
../../gcc/cp/mangle.c:4041
0x719887 mangle_decl(tree_node*)
../../gcc/cp/mangle.c:4078
0xf57cc2 decl_assembler_name(tree_node*)
../../gcc/tree.c:708
0xf9a8be notice_global_symbol(tree_node*)
../../gcc/varasm.c:1801
0x91d505 cgraph_node::finalize_function(tree_node*, bool)
../../gcc/cgraphunit.c:453
0x7ed17f expand_or_defer_fn(tree_node*)
../../gcc/cp/semantics.c:4682
0x7a1c59 cp_parser_function_definition_after_declarator
../../gcc/cp/parser.c:30121
0x7a2afc cp_parser_function_definition_from_specifiers_and_declarator
../../gcc/cp/parser.c:30024
0x7a2afc cp_parser_init_declarator
../../gcc/cp/parser.c:21677
0x782f5a cp_parser_simple_declaration
../../gcc/cp/parser.c:14464
0x7a7395 cp_parser_declaration
../../gcc/cp/parser.c:14161
0x7a68cb cp_parser_translation_unit
../../gcc/cp/parser.c:4942
0x7a68cb c_parse_file()
../../gcc/cp/parser.c:45393
0x8753f2 c_common_parse_file()
../../gcc/c-family/c-opts.c:1218