Merge from mainline (160224:163495).
[official-gcc/graphite-test-results.git] / gcc / testsuite / g++.dg / ext / packed8.C
blob91ee8b3ee74dc6896c2029541678c1d1ccd347b9
1 // PR c++/18378
2 // NOTE: This test assumes packed structure layout differs from unpacked
3 //       structure layout.  This isn't true, e.g., with the default
4 //       arm-none-elf options.
5 // { dg-options "-mstructure-size-boundary=8" { target arm*-*-* } }
7 class A
9 public:
10   int i;
12   A() {}
13   A(const A& a) { i = a.i; }
16 class B
18   A a __attribute__((packed)); // { dg-warning "attribute ignored" "" { target default_packed } }
20 public:
21   B() {}
22   A GetA() { return a; } // { dg-error "" "" { target { ! default_packed } } }