public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/94257] New: ICE in inline nested namespace
@ 2020-03-22 7:15 pacoarjonilla at yahoo dot es
2020-03-25 22:01 ` [Bug c++/94257] " mpolacek at gcc dot gnu.org
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: pacoarjonilla at yahoo dot es @ 2020-03-22 7:15 UTC (permalink / raw)
To: gcc-bugs
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.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/94257] ICE in inline nested namespace
2020-03-22 7:15 [Bug c++/94257] New: ICE in inline nested namespace pacoarjonilla at yahoo dot es
@ 2020-03-25 22:01 ` mpolacek at gcc dot gnu.org
2020-03-26 12:08 ` nathan at gcc dot gnu.org
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2020-03-25 22:01 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94257
Marek Polacek <mpolacek at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed| |2020-03-25
Ever confirmed|0 |1
Status|UNCONFIRMED |NEW
CC| |mpolacek at gcc dot gnu.org,
| |nathan at gcc dot gnu.org
--- Comment #1 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
This compiled without errors until
r8-952-g945bf9e13f706bed44ec760ac60693e00c59b146:
94257.C:4:18: error: conflicting declaration of namespace ‘B’
inline namespace B {
^
and the ICE started with
r8-1488-g71bbbd133f65c26f65709037401154362210560e
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/94257] ICE in inline nested namespace
2020-03-22 7:15 [Bug c++/94257] New: ICE in inline nested namespace pacoarjonilla at yahoo dot es
2020-03-25 22:01 ` [Bug c++/94257] " mpolacek at gcc dot gnu.org
@ 2020-03-26 12:08 ` nathan at gcc dot gnu.org
2020-03-27 14:59 ` cvs-commit at gcc dot gnu.org
2020-03-27 15:01 ` nathan at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: nathan at gcc dot gnu.org @ 2020-03-26 12:08 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94257
Nathan Sidwell <nathan at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Assignee|unassigned at gcc dot gnu.org |nathan at gcc dot gnu.org
Status|NEW |ASSIGNED
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/94257] ICE in inline nested namespace
2020-03-22 7:15 [Bug c++/94257] New: ICE in inline nested namespace pacoarjonilla at yahoo dot es
2020-03-25 22:01 ` [Bug c++/94257] " mpolacek at gcc dot gnu.org
2020-03-26 12:08 ` nathan at gcc dot gnu.org
@ 2020-03-27 14:59 ` cvs-commit at gcc dot gnu.org
2020-03-27 15:01 ` nathan at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-03-27 14:59 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94257
--- Comment #2 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Nathan Sidwell <nathan@gcc.gnu.org>:
https://gcc.gnu.org/g:9dba60130dc3ebf7cce8716a36672281688693f7
commit r10-7423-g9dba60130dc3ebf7cce8716a36672281688693f7
Author: Nathan Sidwell <nathan@acm.org>
Date: Fri Mar 27 07:54:33 2020 -0700
c++: Fix ICE after ambiguous inline namespace reopen [PR94257]
Following DR2061, 'namespace F', looks for 'F's inside inline namespaces.
That can result in ambiguous lookups that we failed to diagnose early
enough,
leading us to push a new namespace and ICE later. Diagnose the ambiguity
earlier, and then pick one.
PR c++/94257
* name-lookup.c (push_namespace): Triage ambiguous lookups that
contain namespaces.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/94257] ICE in inline nested namespace
2020-03-22 7:15 [Bug c++/94257] New: ICE in inline nested namespace pacoarjonilla at yahoo dot es
` (2 preceding siblings ...)
2020-03-27 14:59 ` cvs-commit at gcc dot gnu.org
@ 2020-03-27 15:01 ` nathan at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: nathan at gcc dot gnu.org @ 2020-03-27 15:01 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94257
Nathan Sidwell <nathan at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|ASSIGNED |RESOLVED
--- Comment #3 from Nathan Sidwell <nathan at gcc dot gnu.org> ---
Fixed 9dba60130dc3ebf7cce8716a36672281688693f7
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2020-03-27 15:01 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-22 7:15 [Bug c++/94257] New: ICE in inline nested namespace pacoarjonilla at yahoo dot es
2020-03-25 22:01 ` [Bug c++/94257] " mpolacek at gcc dot gnu.org
2020-03-26 12:08 ` nathan at gcc dot gnu.org
2020-03-27 14:59 ` cvs-commit at gcc dot gnu.org
2020-03-27 15:01 ` nathan at gcc dot gnu.org
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).