| 1 |
// PR c++/109096 |
| 2 |
// { dg-do compile { target c++11 } } |
| 3 |
|
| 4 |
#define INTB (__SIZEOF_INT__ * __CHAR_BIT__) |
| 5 |
struct U { int i : INTB * 3 / 4; int : INTB / 4; }; |
| 6 |
struct V { int : INTB * 3 / 4; int j : INTB / 4; }; |
| 7 |
struct W { int i; int : 0; int j; }; |
| 8 |
static_assert (__has_unique_object_representations (U) == false, ""); |
| 9 |
static_assert (__has_unique_object_representations (V) == false, ""); |
| 10 |
static_assert (sizeof (W) != 2 * sizeof (int) || __has_unique_object_representations (W) == true, ""); |