1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdump-tree-cddce1" } */
3 
bar(short * p)4 int bar (short *p)
5 {
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;
13 }
14 
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.  */
17 
18 /* { dg-final { scan-tree-dump-times "\\\*\[^ \]" 1 "cddce1" } } */
19 /* { dg-final { scan-tree-dump-not "aligned_alloc" "cddce1" } } */
20