Debian Codegraph @

gcc/testsuite/g++.dg/abi/vbase13.C

raw
1 // { dg-do run }
2 // { dg-options "-fabi-version=0 -w" }
3
4 struct E1 {};
5 struct E2 : public E1 {};
6 struct E : public E1, public E2 {};
7 struct N : public E { virtual void f () {} };
8
9 struct X : virtual public N {
10 };
11
12 int main () {
13 X x;
14 /* N should not be the primary base of X; it is not nearly empty. */
15 if ((void*)&x == (void*)(N*)&x)
16 return 1;
17 }