https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69113
Bug ID: 69113 Summary: [6 Regression] ICE: in vague_linkage_p, at cp/decl2.c:1875 with -fno-weak Product: gcc Version: 6.0 Status: UNCONFIRMED Keywords: ice-on-valid-code Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: zsojka at seznam dot cz Target Milestone: --- Host: x86_64-pc-linux-gnu Created attachment 37205 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=37205&action=edit reduced testcase Compiler output: $ gcc testcase.C -fno-weak testcase.C: In static member function 'static void foo::bar()::baz::m()': testcase.C:9:13: internal compiler error: in vague_linkage_p, at cp/decl2.c:1875 static int n; ^ 0x6ca3f6 vague_linkage_p(tree_node*) /repo/gcc-trunk/gcc/cp/decl2.c:1875 0x5fe8cc maybe_commonize_var(tree_node*) /repo/gcc-trunk/gcc/cp/decl.c:5332 0x61ebaf cp_finish_decl(tree_node*, tree_node*, bool, tree_node*, int) /repo/gcc-trunk/gcc/cp/decl.c:6841 0x722d88 cp_parser_init_declarator /repo/gcc-trunk/gcc/cp/parser.c:18601 0x72342e cp_parser_simple_declaration /repo/gcc-trunk/gcc/cp/parser.c:12324 0x7238d4 cp_parser_block_declaration /repo/gcc-trunk/gcc/cp/parser.c:12200 0x724948 cp_parser_declaration_statement /repo/gcc-trunk/gcc/cp/parser.c:11812 0x6fc70a cp_parser_statement /repo/gcc-trunk/gcc/cp/parser.c:10494 0x6fcfc1 cp_parser_statement_seq_opt /repo/gcc-trunk/gcc/cp/parser.c:10772 0x6fd0c3 cp_parser_compound_statement /repo/gcc-trunk/gcc/cp/parser.c:10726 0x7214a0 cp_parser_function_body /repo/gcc-trunk/gcc/cp/parser.c:20594 0x7214a0 cp_parser_ctor_initializer_opt_and_function_body /repo/gcc-trunk/gcc/cp/parser.c:20630 0x7221bf cp_parser_function_definition_after_declarator /repo/gcc-trunk/gcc/cp/parser.c:25257 0x728b24 cp_parser_late_parsing_for_member /repo/gcc-trunk/gcc/cp/parser.c:26100 0x6fa5a9 cp_parser_class_specifier_1 /repo/gcc-trunk/gcc/cp/parser.c:21465 0x6fa5a9 cp_parser_class_specifier /repo/gcc-trunk/gcc/cp/parser.c:21491 0x6fa5a9 cp_parser_type_specifier /repo/gcc-trunk/gcc/cp/parser.c:15789 0x71743b cp_parser_decl_specifier_seq /repo/gcc-trunk/gcc/cp/parser.c:12710 0x723251 cp_parser_simple_declaration /repo/gcc-trunk/gcc/cp/parser.c:12253 0x7238d4 cp_parser_block_declaration /repo/gcc-trunk/gcc/cp/parser.c:12200 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See <http://gcc.gnu.org/bugs.html> for instructions. Tested revisions: trunk r231954 - ICE 5-branch r231950 - OK 4_9-branch r231949 - OK 4_8-branch r224828 - OK