aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/gen-attrs-21.C
blob: 2d5ad04b02c65c739c8e0d127b3b2d91f6dadc57 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// PR c++/20763
// { dg-do compile { target c++11 } }

typedef void *voidp;

struct S
{
  char a;
  voidp b [[gnu::aligned (16)]];
};

struct T
{
  char a;
  void * b [[gnu::aligned (16)]];
};

static_assert (sizeof (S) == sizeof (T),
	       "struct S and T should have the same size");

static_assert (sizeof (S) == 32, "sizeof (S) == 8 + 16 + 8");