PR inline-asm/84742
[official-gcc.git] / gcc / testsuite / gcc.c-torture / execute / ipa-sra-2.c
blobfeb2a34e037c8c9a9f60f87b61c5b8a4a6d872b0
1 /* { dg-require-effective-target int32plus } */
2 struct big
4 int data[1000000];
5 };
7 struct small
9 int data[10];
12 union both
14 struct big big;
15 struct small small;
18 extern void *calloc (__SIZE_TYPE__, __SIZE_TYPE__);
19 extern void free (void *);
21 static int __attribute__((noinline))
22 foo (int fail, union both *agg)
24 int r;
25 if (fail)
26 r = agg->big.data[999999];
27 else
28 r = agg->small.data[0];
29 return r;
32 int main (int argc, char *argv[])
34 union both *agg = calloc (1, sizeof (struct small));
35 int r;
37 r = foo ((argc > 2000), agg);
39 free (agg);
40 return r;