Bug ID: 78637
           Summary: ICE on invalid C++ code on x86_64-linux-gnu (internal
                    compiler error: in pop_namespace, at
           Product: gcc
           Version: 7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot
          Reporter: chengniansun at gmail dot com
  Target Milestone: ---

$ gcc-trunk -v
Using built-in specs.
Target: x86_64-pc-linux-gnu
Configured with: ../gcc-source-trunk/configure --enable-languages=c,c++,lto
--prefix=/usr/local/gcc-trunk --disable-bootstrap
Thread model: posix
gcc version 7.0.0 20161201 (experimental) [trunk revision 243118] (GCC)
$ gcc-trunk small.C
small.C:4:14: error: ‘namespace X::Y { }’ redeclared as different kind of
 namespace X::Y z;
small.C:2:7: note: previous declaration ‘class X::Y’
 class Y;
small.C:4:16: error: expected ‘{’ before ‘z’
 namespace X::Y z;
small.C:4:16: error: ‘z’ does not name a type
small.C:4:17: internal compiler error: in pop_namespace, at
 namespace X::Y z;
0x890072 pop_namespace()
0x7d11bf cp_parser_namespace_definition
0x7d07db cp_parser_declaration
0x7d0ab4 cp_parser_declaration_seq_opt
0x7d0df8 cp_parser_translation_unit
0x7d0df8 c_parse_file()
0x935c32 c_common_parse_file()
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <> for instructions.
$ cat small.C
namespace X {
class Y;
namespace X::Y z;

Reply via email to