2017-09-26 Thomas Koenig <tkoenig@gcc.gnu.org>
[official-gcc.git] / gcc / testsuite / gcc.dg / pr42916.c
blobbbe443609c25f3797cbf1bf344c086b42f4df522
1 /* { dg-do compile } */
2 /* { dg-options "-O1 -funroll-loops -ftree-vectorize -fcompare-debug" } */
3 /* { dg-xfail-if "" { powerpc-ibm-aix* } } */
5 int seed;
7 static inline int hash(const char *str)
9 int h = seed++;
10 int i = 12;
11 while (i--)
12 h += (h << 3) ^ *str++;
13 return h;
16 void f(const char *str, int *h)
18 int i = 6;
19 while (i--)
20 *h++ = hash(str);