| 1 |
// PR target/94707 |
| 2 |
// { dg-do compile { target powerpc*-*-darwin* } } |
| 3 |
// { dg-require-effective-target ilp32 } |
| 4 |
// { dg-options "-std=c++14" } |
| 5 |
|
| 6 |
struct X { }; |
| 7 |
struct Y { int : 0; }; |
| 8 |
struct Z { int : 0; Y y; }; |
| 9 |
struct U : public X { X q; }; |
| 10 |
struct A { double a; }; |
| 11 |
struct B : public X { double a; }; |
| 12 |
struct C : public Y { double a; }; |
| 13 |
struct D : public Z { double a; }; |
| 14 |
struct E : public U { double a; }; |
| 15 |
struct F { [[no_unique_address]] X x; double a; }; |
| 16 |
struct G { [[no_unique_address]] Y y; double a; }; |
| 17 |
struct H { [[no_unique_address]] Z z; double a; }; |
| 18 |
struct I { [[no_unique_address]] U u; double a; }; |
| 19 |
struct J { double a; [[no_unique_address]] X x; }; |
| 20 |
struct K { double a; [[no_unique_address]] Y y; }; |
| 21 |
struct L { double a; [[no_unique_address]] Z z; }; |
| 22 |
struct M { double a; [[no_unique_address]] U u; }; |
| 23 |
static_assert (__alignof__ (A) == 8, ""); |
| 24 |
static_assert (__alignof__ (B) == 8, ""); |
| 25 |
static_assert (__alignof__ (C) == 8, ""); |
| 26 |
static_assert (__alignof__ (D) == 4, ""); |
| 27 |
static_assert (__alignof__ (E) == 4, ""); |
| 28 |
static_assert (__alignof__ (F) == 8, ""); |
| 29 |
static_assert (__alignof__ (G) == 8, ""); |
| 30 |
static_assert (__alignof__ (H) == 4, ""); |
| 31 |
static_assert (__alignof__ (I) == 4, ""); |
| 32 |
static_assert (__alignof__ (J) == 8, ""); |
| 33 |
static_assert (__alignof__ (K) == 8, ""); |
| 34 |
static_assert (__alignof__ (L) == 8, ""); |
| 35 |
static_assert (__alignof__ (M) == 8, ""); |