This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/61945] [5 Regression] tree check fail with -Woverloaded-virtual
- From: "trippels at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 23 Sep 2014 13:57:04 +0000
- Subject: [Bug c++/61945] [5 Regression] tree check fail with -Woverloaded-virtual
- Auto-submitted: auto-generated
- References: <bug-61945-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61945
--- Comment #3 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
Another testcase:
markus@x4 tmp % cat t.ii
class A {
virtual int orbits();
};
class B : A {
template <typename>
void orbits();
};
(4.9 is fine)
markus@x4 tmp % g++ -Woverloaded-virtual -c t.ii
t.ii:2:15: warning: âvirtual int A::orbits()â was hidden [-Woverloaded-virtual]
virtual int orbits();
^
t.ii:6:8: warning: by âB::orbits()â [-Woverloaded-virtual]
void orbits();
^
markus@x4 tmp % /var/tmp/gcc_test/usr/local/bin/g++ -Woverloaded-virtual -c
t.ii
t.ii:4:7: internal compiler error: tree check: expected function_decl, have
template_decl in warn_hidden, at cp/class.c:2824
class B : A {
^
0xdfbb14 tree_check_failed(tree_node const*, char const*, int, char const*,
...)
../../gcc/gcc/tree.c:9177
0x640855 tree_check
../../gcc/gcc/tree.h:2733
0x640855 warn_hidden
../../gcc/gcc/cp/class.c:2824
0x640855 finish_struct_1(tree_node*)
../../gcc/gcc/cp/class.c:6518
0x640ec4 finish_struct(tree_node*, tree_node*)
../../gcc/gcc/cp/class.c:6698
0x66ef52 cp_parser_class_specifier_1
../../gcc/gcc/cp/parser.c:19550
0x671870 cp_parser_class_specifier
../../gcc/gcc/cp/parser.c:19778
0x671870 cp_parser_type_specifier
../../gcc/gcc/cp/parser.c:14527
0x68c6f0 cp_parser_decl_specifier_seq
../../gcc/gcc/cp/parser.c:11768
0x692639 cp_parser_simple_declaration
../../gcc/gcc/cp/parser.c:11358
0x673ab3 cp_parser_block_declaration
../../gcc/gcc/cp/parser.c:11307
0x69e1a2 cp_parser_declaration
../../gcc/gcc/cp/parser.c:11204
0x69ce68 cp_parser_declaration_seq_opt
../../gcc/gcc/cp/parser.c:11090
0x69e753 cp_parser_translation_unit
../../gcc/gcc/cp/parser.c:4055
0x69e753 c_parse_file()
../../gcc/gcc/cp/parser.c:32012
0x7c5a62 c_common_parse_file()
../../gcc/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.