gcc/testsuite/g++.dg/cpp2a/no_unique_address5.C
raw| 1 | // PR c++/96052 |
| 2 | // { dg-do compile { target c++20 } } |
| 3 | |
| 4 | struct Q { |
| 5 | struct { |
| 6 | } emp alignas(8) [[no_unique_address]]; |
| 7 | char x; |
| 8 | }; |
| 9 | struct QQ { |
| 10 | char x; |
| 11 | Q q; |
| 12 | }; |
| 13 | |
| 14 | struct Z { |
| 15 | char x alignas(8) [[no_unique_address]]; |
| 16 | }; |
| 17 | struct ZZ { |
| 18 | char x; |
| 19 | Z z; |
| 20 | }; |
| 21 | |
| 22 | extern char qx[sizeof(QQ)]; |
| 23 | extern char qx[16]; |
| 24 | extern char qz[sizeof(ZZ)]; |
| 25 | extern char qz[16]; |