Debian Codegraph @

gcc/testsuite/g++.dg/cpp0x/gen-attrs-21.C

raw
1 // PR c++/20763
2 // { dg-do compile { target c++11 } }
3
4 typedef void *voidp;
5
6 struct S
7 {
8 char a;
9 voidp b [[gnu::aligned (16)]];
10 };
11
12 struct T
13 {
14 char a;
15 void * b [[gnu::aligned (16)]];
16 };
17
18 static_assert (sizeof (S) == sizeof (T),
19 "struct S and T should have the same size");
20
21 static_assert (sizeof (S) == 32, "sizeof (S) == 8 + 16 + 8");