https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63367
Bug ID: 63367 Summary: internal compiler error: tree check: expected function_decl, have template_decl in warn_hidden, at cp/class.c:2824 Product: gcc Version: 5.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: cas43 at cs dot stanford.edu When trying to compile this: class A {virtual void f();}; class B : public A {template<class T> void f();}; Run like this: g++ -Woverloaded-virtual -c prog.cpp I get this output: prog.cpp:2:7: internal compiler error: tree check: expected function_decl, have template_decl in warn_hidden, at cp/class.c:2824 class B : public A {template<class T> void f();}; ^ 0xdf6bf4 tree_check_failed(tree_node const*, char const*, int, char const*, ...) ../../s-trunk/gcc/tree.c:9167 0x64165c tree_check(tree_node*, char const*, int, char const*, tree_code) ../../s-trunk/gcc/tree.h:2733 0x64165c warn_hidden ../../s-trunk/gcc/cp/class.c:2824 0x64165c finish_struct_1(tree_node*) ../../s-trunk/gcc/cp/class.c:6518 0x641df4 finish_struct(tree_node*, tree_node*) ../../s-trunk/gcc/cp/class.c:6698 0x66fd32 cp_parser_class_specifier_1 ../../s-trunk/gcc/cp/parser.c:19627 0x672690 cp_parser_class_specifier ../../s-trunk/gcc/cp/parser.c:19855 0x672690 cp_parser_type_specifier ../../s-trunk/gcc/cp/parser.c:14531 0x68d594 cp_parser_decl_specifier_seq ../../s-trunk/gcc/cp/parser.c:11772 0x693549 cp_parser_simple_declaration ../../s-trunk/gcc/cp/parser.c:11362 0x6748c3 cp_parser_block_declaration ../../s-trunk/gcc/cp/parser.c:11311 0x69eff5 cp_parser_declaration ../../s-trunk/gcc/cp/parser.c:11208 0x69dca8 cp_parser_declaration_seq_opt ../../s-trunk/gcc/cp/parser.c:11094 0x69f502 cp_parser_translation_unit ../../s-trunk/gcc/cp/parser.c:4059 0x69f502 c_parse_file() ../../s-trunk/gcc/cp/parser.c:32089 0x7c6112 c_common_parse_file() ../../s-trunk/gcc/c-family/c-opts.c:1043 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. Compiler: Using built-in specs. COLLECT_GCC=/home/craig/new-gcc/i-trunk/bin/g++ COLLECT_LTO_WRAPPER=/home/craig/new-gcc/i-trunk/libexec/gcc/x86_64-unknown-linux-gnu/5.0.0/lto-wrapper Target: x86_64-unknown-linux-gnu Configured with: ../s-trunk/configure --prefix=/home/craig/new-gcc/i-trunk Thread model: posix gcc version 5.0.0 20140924 (experimental) (GCC)