Debian Codegraph @

gcc/testsuite/gcc.dg/pr43783.c

raw
1 /* { dg-do compile } */
2 /* { dg-options "" } */
3 /* { dg-skip-if "small alignment" { pdp11-*-* } } */
4
5 typedef __attribute__((aligned(16)))
6 struct {
7 unsigned long long w[3];
8 } UINT192;
9
10 UINT192 bid_Kx192[32]; /* { dg-error "size of array element is not a multiple of its alignment" } */
11
12 extern void abort (void);
13
14 int main()
15 {
16 int i = 0;
17 unsigned long x = 0;
18 for (i = 0; i < 32; ++i)
19 bid_Kx192[i].w[1] = i == 1;
20 for (i = 0; i < 32; ++i)
21 x += bid_Kx192[1].w[1];
22 if (x != 32)
23 abort ();
24 return 0;
25 }