This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/68723] New: ice in pop_nested_namespace, at cp/name-lookup.c:3816
- From: "regehr at cs dot utah.edu" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 05 Dec 2015 18:28:35 +0000
- Subject: [Bug c++/68723] New: ice in pop_nested_namespace, at cp/name-lookup.c:3816
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68723
Bug ID: 68723
Summary: ice in pop_nested_namespace, at cp/name-lookup.c:3816
Product: gcc
Version: 6.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: regehr at cs dot utah.edu
Target Milestone: ---
ICE on invalid code
$ g++ -v
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/home/regehr/z/compiler-install/gcc-r231259-install/libexec/gcc/x86_64-pc-linux-gnu/6.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /home/regehr/z/compiler-source/gcc/configure
--prefix=/home/regehr/z/compiler-install/gcc-r231259-install
--disable-bootstrap --disable-multilib --enable-languages=c,c++
Thread model: posix
gcc version 6.0.0 20151204 (experimental) (GCC)
$ cat hello.cpp
struct Trans_NS_std_std;
namespace Trans_NS_std_std class A {
friend fn1 ( exception_ptr,
$ g++ -w -std=c++11 hello.cpp
hello.cpp:2:11: error: ânamespace Trans_NS_std_std { }â redeclared as different
kind of symbol
namespace Trans_NS_std_std class A {
^~~~~~~~~~~~~~~~
hello.cpp:1:8: note: previous declaration âstruct Trans_NS_std_stdâ
struct Trans_NS_std_std;
^~~~~~~~~~~~~~~~
hello.cpp:2:28: error: expected â{â before âclassâ
namespace Trans_NS_std_std class A {
^~~~~
hello.cpp:3:22: error: âexception_ptrâ has not been declared
friend fn1 ( exception_ptr,
^~~~~~~~~~~~~
hello.cpp:3:35: error: expected identifier at end of input
friend fn1 ( exception_ptr,
^
hello.cpp:3:35: error: expected â,â or â...â at end of input
hello.cpp:3:35: error: expected â)â at end of input
hello.cpp:3:35: error: ISO C++ forbids declaration of âfn1â with no type
[-fpermissive]
hello.cpp:3:35: error: ânamespace Trans_NS_std_std { }â redeclared as different
kind of symbol
hello.cpp:1:8: note: previous declaration âstruct Trans_NS_std_stdâ
struct Trans_NS_std_std;
^~~~~~~~~~~~~~~~
hello.cpp:3:35: internal compiler error: in pop_nested_namespace, at
cp/name-lookup.c:3816
friend fn1 ( exception_ptr,
^
0x7b8e36 pop_nested_namespace(tree_node*)
/home/regehr/z/compiler-source/gcc/gcc/cp/name-lookup.c:3816
0x730838 do_friend(tree_node*, tree_node*, tree_node*, tree_node*,
overload_flags, bool)
/home/regehr/z/compiler-source/gcc/gcc/cp/friend.c:586
0x5e991a grokdeclarator(cp_declarator const*, cp_decl_specifier_seq*,
decl_context, int, tree_node**)
/home/regehr/z/compiler-source/gcc/gcc/cp/decl.c:11142
0x6a26b8 grokfield(cp_declarator const*, cp_decl_specifier_seq*, tree_node*,
bool, tree_node*, tree_node*)
/home/regehr/z/compiler-source/gcc/gcc/cp/decl2.c:873
0x6c2872 cp_parser_member_declaration
/home/regehr/z/compiler-source/gcc/gcc/cp/parser.c:22106
0x6c5ba6 cp_parser_member_specification_opt
/home/regehr/z/compiler-source/gcc/gcc/cp/parser.c:21653
0x6c5ba6 cp_parser_class_specifier_1
/home/regehr/z/compiler-source/gcc/gcc/cp/parser.c:20845
0x6c85d9 cp_parser_class_specifier
/home/regehr/z/compiler-source/gcc/gcc/cp/parser.c:21081
0x6c85d9 cp_parser_type_specifier
/home/regehr/z/compiler-source/gcc/gcc/cp/parser.c:15391
0x6e568b cp_parser_decl_specifier_seq
/home/regehr/z/compiler-source/gcc/gcc/cp/parser.c:12343
0x6f1221 cp_parser_simple_declaration
/home/regehr/z/compiler-source/gcc/gcc/cp/parser.c:11909
0x6f18d0 cp_parser_block_declaration
/home/regehr/z/compiler-source/gcc/gcc/cp/parser.c:11856
0x6fdd77 cp_parser_declaration
/home/regehr/z/compiler-source/gcc/gcc/cp/parser.c:11753
0x6fc24d cp_parser_declaration_seq_opt
/home/regehr/z/compiler-source/gcc/gcc/cp/parser.c:11632
0x6fca03 cp_parser_namespace_body
/home/regehr/z/compiler-source/gcc/gcc/cp/parser.c:17160
0x6fca03 cp_parser_namespace_definition
/home/regehr/z/compiler-source/gcc/gcc/cp/parser.c:17137
0x6fdcd7 cp_parser_declaration
/home/regehr/z/compiler-source/gcc/gcc/cp/parser.c:11737
0x6fc24d cp_parser_declaration_seq_opt
/home/regehr/z/compiler-source/gcc/gcc/cp/parser.c:11632
0x6fc598 cp_parser_translation_unit
/home/regehr/z/compiler-source/gcc/gcc/cp/parser.c:4189
0x6fc598 c_parse_file()
/home/regehr/z/compiler-source/gcc/gcc/cp/parser.c:36844
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.