1 // { dg-do compile { target c++11 } }
2 // { dg-options "-fabi-version=18 -Wabi=19" }
6 #define NOUNIQUE [[no_unique_address]]
9 #define CHECK_DISTINCT(type, field1, field2) static_assert(offsetof(type, field1) != offsetof(type, field2))
10 #define CHECK_SAME(type, field1, field2) static_assert(offsetof(type, field1) == offsetof(type, field2))
16 CHECK_DISTINCT(A1, a, b);
18 NOUNIQUE const Empty a;
21 CHECK_DISTINCT(A2, a, b);
22 struct A3 { // { dg-warning "layout" }
23 NOUNIQUE const Empty a;
27 struct A4 { // { dg-warning "layout" }