libcpp, c, middle-end: Optimize initializers using #embed in C
[official-gcc.git] / gcc / testsuite / gcc.dg / pr36093.c
blob84746416f1bc0ecc7064168cd6310cf5e8571e82
1 /* { dg-do compile } */
2 /* { dg-skip-if "small alignment" { pdp11-*-* } } */
4 extern void abort (void);
6 typedef struct Bar {
7 char c[129];
8 } Bar __attribute__((__aligned__(128)));
10 typedef struct Foo {
11 Bar bar[4]; /* { dg-error "size of array element is not a multiple of its alignment" } */
12 } Foo;
14 Foo foo[4];
16 int main()
18 int i, j;
19 Foo *foop = &foo[0];
21 for (i=0; i < 4; i++) {
22 Bar *bar = &foop->bar[i];
23 for (j=0; j < 129; j++) {
24 bar->c[j] = 'a' + i;
28 if (foo[0].bar[3].c[128] != 'd')
29 abort ();
30 return 0;