https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93869
Bug ID: 93869 Summary: ICE in contains_struct_check with -Wmismatched-tags upon redundant typename Product: gcc Version: 10.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: sbergman at redhat dot com CC: msebor at gcc dot gnu.org Target Milestone: --- With recent GCC trunk (incl. the fix from bug 93801 comment 3, though I do not know whether that makes a difference): > $ cat test.cc > namespace N { typedef int T; } > typename N::T x; > $ g++ -fsyntax-only -Wmismatched-tags test.cc > test.cc:2:13: internal compiler error: Segmentation fault > 2 | typename N::T x; > | ^ > 0xfd962f crash_signal > ../../src/gcc/toplev.c:328 > 0x7f55158a16af ??? > > /usr/src/debug/glibc-2.30-34-g994e529a37/signal/../sysdeps/unix/sysv/linux/x86_64/sigaction.c:0 > 0x9a1c0f contains_struct_check(tree_node*, tree_node_structure_enum, char > const*, int, char const*) > ../../src/gcc/tree.h:3391 > 0x9a1c0f cp_parser_check_class_key > ../../src/gcc/cp/parser.c:30991 > 0x9c5ad4 cp_parser_elaborated_type_specifier > ../../src/gcc/cp/parser.c:18930 > 0x9aea83 cp_parser_type_specifier > ../../src/gcc/cp/parser.c:17681 > 0x9afbcf cp_parser_decl_specifier_seq > ../../src/gcc/cp/parser.c:14303 > 0x9b0600 cp_parser_simple_declaration > ../../src/gcc/cp/parser.c:13557 > 0x9d9302 cp_parser_declaration > ../../src/gcc/cp/parser.c:13377 > 0x9d9a82 cp_parser_translation_unit > ../../src/gcc/cp/parser.c:4731 > 0x9d9a82 c_parse_file() > ../../src/gcc/cp/parser.c:43716 > 0xaedd0b c_common_parse_file() > ../../src/gcc/c-family/c-opts.c:1186 > 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.