gcc/testsuite/g++.dg/abi/empty10.C
raw| 1 | // { dg-do run { target i?86-*-* x86_64-*-* } } |
| 2 | // { dg-require-effective-target ilp32 } |
| 3 | // { dg-options "-fabi-version=0 -w" } |
| 4 | |
| 5 | struct E {}; |
| 6 | struct E2 : public E {}; |
| 7 | |
| 8 | struct A { |
| 9 | int i; |
| 10 | }; |
| 11 | |
| 12 | struct B { |
| 13 | int j; |
| 14 | }; |
| 15 | |
| 16 | struct C : |
| 17 | public E, |
| 18 | public A, |
| 19 | public E2, |
| 20 | virtual public B { |
| 21 | }; |
| 22 | |
| 23 | C c; |
| 24 | |
| 25 | int main () { |
| 26 | if (((char*)(B*)&c - (char*)&c) != 8) |
| 27 | return 1; |
| 28 | } |