Command line: g++ testcase.C --------- testcase.C --------- namespace std { namespace { struct S {}; } } ------------------------------
Tested revisions: r156830 - crash r156515 - crash r156367 - crash r156293 - OK r153685 - OK 4.4 r156256 - OK Valgrind output: ==12612== Command: /mnt/svn/gcc-trunk/binary-156830-lto/libexec/gcc/x86_64-unknown-linux-gnu/4.5.0/cc1plus -quiet -D_GNU_SOURCE testcase.C -quiet -dumpbase testcase.C -mtune=generic -auxbase testcase -o /tmp/cckpV07O.s ==12612== ==12612== Invalid read of size 2 ==12612== at 0x5C2192: begin_class_definition (semantics.c:2381) ==12612== by 0x565F57: cp_parser_type_specifier (parser.c:15874) ==12612== by 0x572ED1: cp_parser_decl_specifier_seq (parser.c:9214) ==12612== by 0x562D4A: cp_parser_simple_declaration (parser.c:8876) ==12612== by 0x57A076: cp_parser_block_declaration (parser.c:8837) ==12612== by 0x5824C9: cp_parser_declaration (parser.c:8742) ==12612== by 0x581F39: cp_parser_declaration_seq_opt (parser.c:8633) ==12612== by 0x58215F: cp_parser_namespace_definition (parser.c:12933) ==12612== by 0x582597: cp_parser_declaration (parser.c:8734) ==12612== by 0x581F39: cp_parser_declaration_seq_opt (parser.c:8633) ==12612== by 0x58215F: cp_parser_namespace_definition (parser.c:12933) ==12612== by 0x582597: cp_parser_declaration (parser.c:8734) ==12612== Address 0x0 is not stack'd, malloc'd or (recently) free'd ==12612== testcase.C:3:13: internal compiler error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions. -- Summary: ICE: SIGSEGV with unnamed namespace inside named Product: gcc Version: 4.5.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: zsojka at seznam dot cz GCC host triplet: x86_64-pc-linux-gnu GCC target triplet: x86_64-pc-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43109