| 1 |
// PR c++/120012 |
| 2 |
// { dg-do compile { target c++11 } } |
| 3 |
// { dg-additional-options "-fabi-version=21 -Wabi=20" } |
| 4 |
|
| 5 |
// The fix isn't implemented in this version. |
| 6 |
// { dg-bogus "-fabi-version=21" "" { xfail *-*-* } 0 } |
| 7 |
|
| 8 |
struct A |
| 9 |
{ |
| 10 |
A(const A&) = default; |
| 11 |
A(A&&) = default; |
| 12 |
A& operator=(A&&) = default; |
| 13 |
unsigned int a; |
| 14 |
unsigned char b; |
| 15 |
}; |
| 16 |
struct B: A |
| 17 |
{ |
| 18 |
unsigned char c; |
| 19 |
}; |
| 20 |
|
| 21 |
static_assert(sizeof(A) == (2 * sizeof(unsigned int)), ""); |
| 22 |
static_assert(sizeof(B) == (3 * sizeof(unsigned int)), ""); // { dg-bogus "failed" "" { xfail c++20 } } |