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:
Jason Merrill 2017-03-17 14:42:09 -04:00 committed by Jason Merrill
parent 2da189b6ea
commit c7ec585d78
3 changed files with 16 additions and 0 deletions

View File

@ -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.

View File

@ -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)

View File

@ -0,0 +1,8 @@
// PR c++/80073
// { dg-do compile { target c++11 } }
struct A {};
struct B : virtual A {};
struct C : B {} c {};