This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/84426] New: [8 Regression] ICE with conflicting class member names
- From: "reichelt at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 16 Feb 2018 20:41:50 +0000
- Subject: [Bug c++/84426] New: [8 Regression] ICE with conflicting class member names
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84426
Bug ID: 84426
Summary: [8 Regression] ICE with conflicting class member names
Product: gcc
Version: 8.0
Status: UNCONFIRMED
Keywords: error-recovery, ice-on-invalid-code
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: reichelt at gcc dot gnu.org
Target Milestone: ---
The following invalid code snippet triggers an ICE on trunk:
=============================
struct A
{
int foo;
virtual void foo();
};
struct B : A {};
=============================
bug.cc:4:20: error: 'virtual void A::foo()' conflicts with a previous
declaration
virtual void foo();
^
bug.cc:3:7: note: previous declaration 'int A::foo'
int foo;
^~~
bug.cc:7:8: internal compiler error: in update_vtable_entry_for_fn, at
cp/class.c:2412
struct B : A {};
^
0x5dcc45 update_vtable_entry_for_fn
../../gcc/gcc/cp/class.c:2412
0x5dcc45 dfs_modify_vtables
../../gcc/gcc/cp/class.c:2664
0x998a4d dfs_walk_all(tree_node*, tree_node* (*)(tree_node*, void*), tree_node*
(*)(tree_node*, void*), void*)
../../gcc/gcc/cp/search.c:1410
0x99ac87 dfs_walk_once(tree_node*, tree_node* (*)(tree_node*, void*),
tree_node* (*)(tree_node*, void*), void*)
../../gcc/gcc/cp/search.c:1507
0x843eaa modify_all_vtables
../../gcc/gcc/cp/class.c:2692
0x843eaa finish_struct_1(tree_node*)
../../gcc/gcc/cp/class.c:6827
0x845d6c finish_struct(tree_node*, tree_node*)
../../gcc/gcc/cp/class.c:7061
0x927000 cp_parser_class_specifier_1
../../gcc/gcc/cp/parser.c:22498
0x928f79 cp_parser_class_specifier
../../gcc/gcc/cp/parser.c:22742
0x928f79 cp_parser_type_specifier
../../gcc/gcc/cp/parser.c:16748
0x936126 cp_parser_decl_specifier_seq
../../gcc/gcc/cp/parser.c:13606
0x93b7f0 cp_parser_simple_declaration
../../gcc/gcc/cp/parser.c:12916
0x93c798 cp_parser_block_declaration
../../gcc/gcc/cp/parser.c:12863
0x9406f2 cp_parser_declaration
../../gcc/gcc/cp/parser.c:12761
0x940b01 cp_parser_declaration_seq_opt
../../gcc/gcc/cp/parser.c:12637
0x940df4 cp_parser_translation_unit
../../gcc/gcc/cp/parser.c:4559
0x940df4 c_parse_file()
../../gcc/gcc/cp/parser.c:38860
0xa3eee6 c_common_parse_file()
../../gcc/gcc/c-family/c-opts.c:1132
Please submit a full bug report, [etc.]
The regression was introduced between 2017-09-09 and 2017-09-22.