2 // -fpack-struct is necessary because the code below assumes the initial
3 // packing is larger than 1, which cannot ge guaranteed for all targets.
4 // { dg-options "-Wabi -fabi-version=1 -fpack-struct=8" }
5 // On ARM processors, the alignment of B will be 4 even though it
6 // contains only a single "char". That would avoids the situation
7 // that the warning below is designed to catch. We therefore
8 // explicitly set the default structure alignment to 1.
9 // { dg-options "-Wabi -fabi-version=1 -mstructure-size-boundary=8" { target arm*-*-* } }
11 struct A { virtual void f(); char c1; };
12 struct B { B(); char c2; };
13 struct C : public A, public virtual B {}; // { dg-warning "ABI" }