repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
libatomic: Handle AVX+CX16 ZHAOXIN like Intel for 16b atomic [PR104688]
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
abi
/
no_unique_address4.C
blob
c62cfe1f2c18f95f6260386ad5a54fa935d543d2
1
// Test that [[no_unique_address]] makes the enclosing class non-layout-POD.
2
// { dg-do compile { target c++11 } }
3
4
struct A {};
5
struct B1: A {
6
int i;
7
char c;
8
};
9
10
struct B2 {
11
[[no_unique_address]] A a;
12
int i;
13
char c;
14
};
15
16
struct C1: B1 {
17
char d;
18
};
19
20
struct C2: B2 {
21
char d;
22
};
23
24
#define SA(X) static_assert((X),#X)
25
SA(sizeof(C1) == sizeof(C2));