aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr43783.c
blob: 196735b1b61dd3c2cf39850fb2b8a78d2918e9be (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
/* { dg-do compile } */
/* { dg-options "" } */
/* { dg-skip-if "small alignment" { pdp11-*-* } } */

typedef __attribute__((aligned(16)))
struct {
  unsigned long long w[3];
} UINT192;

UINT192 bid_Kx192[32];	/* { dg-error "size of array element is not a multiple of its alignment" } */

extern void abort (void);

int main()
{
  int i = 0;
  unsigned long x = 0;
  for (i = 0; i < 32; ++i)
    bid_Kx192[i].w[1] = i == 1;
  for (i = 0; i < 32; ++i)
    x += bid_Kx192[1].w[1];
  if (x != 32)
    abort ();
  return 0;
}