[Bug c++/94257] New: ICE in inline nested namespace
pacoarjonilla at yahoo dot es
gcc-bugzilla@gcc.gnu.org
Sun Mar 22 07:15:16 GMT 2020
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94257
Bug ID: 94257
Summary: ICE in inline nested namespace
Product: gcc
Version: 10.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: pacoarjonilla at yahoo dot es
Target Milestone: ---
Only in GCC10
inline namespace B {
inline namespace B { }
}
inline namespace B {
class C {
friend void f();
};
}
$> g++10 bug.cc
cairo.cc:4:18: error: ‘namespace B { }’ conflicts with a previous declaration
4 | inline namespace B {
| ^
cairo.cc:1:18: note: previous declaration ‘namespace B { }’
1 | inline namespace B {
| ^
cairo.cc:6:19: internal compiler error: in do_push_nested_namespace, at
cp/name-lookup.c:7225
6 | friend void f();
| ^
0x65c058 do_push_nested_namespace
../../gcc/gcc/cp/name-lookup.c:7225
0x991b8c push_nested_namespace(tree_node*)
../../gcc/gcc/cp/name-lookup.c:7494
0x951384 do_friend(tree_node*, tree_node*, tree_node*, tree_node*,
overload_flags, bool)
../../gcc/gcc/cp/friend.c:626
0x91cb5e grokdeclarator(cp_declarator const*, cp_decl_specifier_seq*,
decl_context, int, tree_node**)
../../gcc/gcc/cp/decl.c:13364
0x93877f grokfield(cp_declarator const*, cp_decl_specifier_seq*, tree_node*,
bool, tree_node*, tree_node*)
../../gcc/gcc/cp/decl2.c:841
0x9d936b cp_parser_member_declaration
../../gcc/gcc/cp/parser.c:25259
0x9adb31 cp_parser_member_specification_opt
../../gcc/gcc/cp/parser.c:24703
0x9adb31 cp_parser_class_specifier_1
../../gcc/gcc/cp/parser.c:23800
0x9afbe3 cp_parser_class_specifier
../../gcc/gcc/cp/parser.c:24107
0x9afbe3 cp_parser_type_specifier
../../gcc/gcc/cp/parser.c:17666
0x9b0cbb cp_parser_decl_specifier_seq
../../gcc/gcc/cp/parser.c:14314
0x9b1701 cp_parser_simple_declaration
../../gcc/gcc/cp/parser.c:13568
0x9da782 cp_parser_declaration
../../gcc/gcc/cp/parser.c:13388
0x9da4c2 cp_parser_toplevel_declaration
../../gcc/gcc/cp/parser.c:13416
0x9da4c2 cp_parser_declaration_seq_opt
../../gcc/gcc/cp/parser.c:13264
0x9da4c2 cp_parser_namespace_body
../../gcc/gcc/cp/parser.c:19644
0x9da4c2 cp_parser_namespace_definition
../../gcc/gcc/cp/parser.c:19622
0x9da8c8 cp_parser_declaration
../../gcc/gcc/cp/parser.c:13368
0x9daf0a cp_parser_translation_unit
../../gcc/gcc/cp/parser.c:4731
0x9daf0a c_parse_file()
../../gcc/gcc/cp/parser.c:43758
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
More information about the Gcc-bugs
mailing list