OSDN Git Service

2007-03-22 Dirk Mueller <dmueller@suse.de>
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.dg / abi / empty6.C
1 // { dg-options "-Wabi" }
2
3 struct A {};
4
5 struct B {
6   A a; // { dg-warning "empty" "" { xfail mmix-*-* } }
7   virtual void f () {}
8 } __attribute__((aligned(2 * sizeof (void *))));
9 /* The preceding attribute is necessary on targets with
10    BIGGEST_ALIGNMENT <= POINTER_SIZE to trigger the warning, as
11    otherwise the offset of 'a' (i.e. POINTER_SIZE) is split into a
12    non-zero DECL_FIELD_OFFSET and a zero DECL_FIELD_BIT_OFFSET,
13    and then there is no discrepancy between DECL_FIELD_OFFSET and
14    byte_position to warn about.  */