2018-05-17 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / alias-32.c
blob7ac8e81e3f2693506b49d2326db970e3dcf7417b
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdump-tree-cddce1" } */
4 int bar (short *p)
6 int res = *p;
7 struct { int *q1; int *q2; } q;
8 q.q1 = __builtin_aligned_alloc (128, 128 * sizeof (int));
9 q.q2 = __builtin_aligned_alloc (128, 128 * sizeof (int));
10 *q.q1 = 1;
11 *q.q2 = 2;
12 return res + *p + *q.q1 + *q.q2;
15 /* There should be only one load from *p left. All stores and all
16 other loads should be removed. Likewise the calls to aligned_alloc. */
18 /* { dg-final { scan-tree-dump-times "\\\*\[^ \]" 1 "cddce1" } } */
19 /* { dg-final { scan-tree-dump-not "aligned_alloc" "cddce1" } } */