PR c++/80073 - C++17 ICE with virtual base.
* decl.c (xref_basetypes): Also check for indirect vbases. From-SVN: r246242
This commit is contained in:
parent
2da189b6ea
commit
c7ec585d78
@ -1,3 +1,8 @@
|
||||
2017-03-17 Jason Merrill <jason@redhat.com>
|
||||
|
||||
PR c++/80073 - C++17 ICE with virtual base.
|
||||
* decl.c (xref_basetypes): Also check for indirect vbases.
|
||||
|
||||
2017-03-16 Jason Merrill <jason@redhat.com>
|
||||
|
||||
* decl.c (start_enum): std::byte aliases anything.
|
||||
|
@ -13812,6 +13812,9 @@ xref_basetypes (tree ref, tree base_list)
|
||||
|
||||
if (max_vbases)
|
||||
{
|
||||
/* An aggregate can't have virtual base classes. */
|
||||
CLASSTYPE_NON_AGGREGATE (ref) = true;
|
||||
|
||||
vec_alloc (CLASSTYPE_VBASECLASSES (ref), max_vbases);
|
||||
|
||||
if (max_dvbases)
|
||||
|
8
gcc/testsuite/g++.dg/init/vbase2.C
Normal file
8
gcc/testsuite/g++.dg/init/vbase2.C
Normal file
@ -0,0 +1,8 @@
|
||||
// PR c++/80073
|
||||
// { dg-do compile { target c++11 } }
|
||||
|
||||
struct A {};
|
||||
|
||||
struct B : virtual A {};
|
||||
|
||||
struct C : B {} c {};
|
Loading…
Reference in New Issue
Block a user