Remove old autovect-branch by moving to "dead" directory.
[official-gcc.git] / old-autovect-branch / gcc / testsuite / g++.dg / ext / packed2.C
blob66f156bac7ce46513476e330cd85e9eba2c5af7f
1 // PR c++/10091
3 // Original synopsis
4 // Bug: We were dying because in general, B::a doesn't have enough
5 // alignment for us to take its address.  But if the B is C::b, it does
6 // have enough alignment, and we should be able to determine that.
8 // This only failed on STRICT_ALIGNMENT targets (i.e. not i686)
10 // July 2003
11 // packing of non-pods is now only allowed if the non-pod is itself
12 // packed. Also only such pods can be reference bound to non-consts
14 struct A {
15   int i;
17   A();
18   A(const A&);
19   A& operator=(const A&);
20 } __attribute__ ((packed));
22 struct B {
23   A a;
24 } __attribute__ ((packed));
26 struct C {
27   B b;
28   int j;
31 void f (A&);
32 void g (C& c)
34   f (c.b.a);