Debian Codegraph @

gcc/testsuite/gcc.c-torture/execute/20100708-1.c

raw
1 /* PR middle-end/44843 */
2 /* Verify that we don't use the alignment of struct S for inner accesses. */
3
4 struct S
5 {
6 double for_alignment;
7 struct { int x, y, z; } a[16];
8 };
9
10 void f(struct S *s) __attribute__((noinline));
11
12 void f(struct S *s)
13 {
14 unsigned int i;
15
16 for (i = 0; i < 16; ++i)
17 {
18 s->a[i].x = 0;
19 s->a[i].y = 0;
20 s->a[i].z = 0;
21 }
22 }
23
24 int main (void)
25 {
26 struct S s;
27 f (&s);
28 return 0;
29 }