2018-06-05 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.dg / pr64316.c
blobf478aa611785fe154d19f43c4f7624f1bb471ea8
1 /* PR rtl-optimization/64316 */
2 /* { dg-do compile } */
3 /* { dg-options "-O3" } */
4 /* { dg-additional-options "-mavx2" { target { i?86-*-* x86_64-*-* } } } */
6 struct S
8 unsigned int s;
9 unsigned long w[];
12 struct S **s;
14 int
15 foo (struct S *x, struct S *y, struct S *z)
17 unsigned int i;
18 unsigned long *a, *b, *c;
19 int r = 0;
20 for (a = x->w, b = y->w, c = z->w, i = 0; i < x->s; i++, a++)
22 unsigned long d = *b++ & *c++;
23 if (*a != d)
25 r = 1;
26 *a = d;
29 return r;
32 void
33 bar (int x)
35 int p = x - 1;
38 foo (s[x], s[x], s[p]);
39 p--;
41 while (p > 0);