Fix warning with -Wsign-compare -Wsystem-headers
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / alias-31.c
blobc4cdd1c9ab8872c84df3017638b5889f88d762d7
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fno-tree-sra -fdump-tree-cddce1" } */
4 extern int posix_memalign(void **memptr,
5 __SIZE_TYPE__ alignment, __SIZE_TYPE__ size);
7 int foo (float *p)
9 int res = *p;
10 struct { void *q1; void *q2; } q;
11 if (posix_memalign (&q.q1, 128, 128 * sizeof (int)) != 0)
12 return 0;
13 if (posix_memalign (&q.q2, 128, 128 * sizeof (int)) != 0)
14 return 0;
15 *((int *)q.q1) = 1;
16 *((int *)q.q2) = 2;
17 return res + *p + *((int *)q.q1) + *((int *)q.q2);
20 /* There should be only one load from *p left. All stores and all
21 other loads should be removed. */
23 /* { dg-final { scan-tree-dump-times "\\\*\[^ \]" 1 "cddce1" } } */