https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95719
Bug ID: 95719 Summary: SEGV in tree_check Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: sbergman at redhat dot com Target Milestone: --- With a locally-built recent GCC 11 trunk (git rev 48b6386f5d0bdcbe5c901678a043516d544a9f7f), but not with e.g. gcc-c++-10.1.1-1.fc32.x86_64: > $ cat test.cc > struct S1 { virtual ~S1(); }; > struct S2 { > virtual ~S2(); > virtual void f(); > }; > struct S3 final: S1, S2 { using S2::f; }; > void g(S3 & s) { s.f(); } > $ g++ -fsyntax-only test.cc > test.cc: In function ‘void g(S3&)’: > test.cc:7:22: internal compiler error: Segmentation fault > 7 | void g(S3 & s) { s.f(); } > | ^ > 0x100471f crash_signal > ../../src/gcc/toplev.c:328 > 0x7f245b447aaf ??? > > /usr/src/debug/glibc-2.31-17-gab029a2801/signal/../sysdeps/unix/sysv/linux/x86_64/sigaction.c:0 > 0x8afd41 tree_check(tree_node*, char const*, int, char const*, tree_code) > ../../src/gcc/tree.h:3300 > 0x8afd41 lookup_vfn_in_binfo(tree_node*, tree_node*) > ../../src/gcc/cp/class.c:2459 > 0x89f872 build_over_call > ../../src/gcc/cp/call.c:8697 > 0x8a1a2c build_new_method_call_1 > ../../src/gcc/cp/call.c:10352 > 0x8a294f build_new_method_call(tree_node*, tree_node*, vec<tree_node*, va_gc, > vl_embed>**, tree_node*, int, tree_node**, int) > ../../src/gcc/cp/call.c:10427 > 0x9d408c cp_parser_postfix_expression > ../../src/gcc/cp/parser.c:7481 > 0x9b61ca cp_parser_binary_expression > ../../src/gcc/cp/parser.c:9609 > 0x9b7d2e cp_parser_assignment_expression > ../../src/gcc/cp/parser.c:9914 > 0x9b8052 cp_parser_expression > ../../src/gcc/cp/parser.c:10082 > 0x9baee8 cp_parser_expression_statement > ../../src/gcc/cp/parser.c:11742 > 0x9c6290 cp_parser_statement > ../../src/gcc/cp/parser.c:11538 > 0x9c7b68 cp_parser_statement_seq_opt > ../../src/gcc/cp/parser.c:11889 > 0x9c7c48 cp_parser_compound_statement > ../../src/gcc/cp/parser.c:11839 > 0x9df215 cp_parser_function_body > ../../src/gcc/cp/parser.c:23115 > 0x9df215 cp_parser_ctor_initializer_opt_and_function_body > ../../src/gcc/cp/parser.c:23166 > 0x9e253d cp_parser_function_definition_after_declarator > ../../src/gcc/cp/parser.c:29062 > 0x9e3529 cp_parser_function_definition_from_specifiers_and_declarator > ../../src/gcc/cp/parser.c:28978 > 0x9e3529 cp_parser_init_declarator > ../../src/gcc/cp/parser.c:20721 > 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.