OSDN Git Service

PR tree-optimization/40542
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.dg / vect / ggc-pr37574.c
1 /* { dg-do compile } */
2
3 #include <stdarg.h>
4
5 unsigned short in[40 +128];
6 int main (void) {
7   int i = 0, j = 0;
8   unsigned int diff;
9   unsigned int s=0,sum=0;
10   for (i = 0; i < 40;i++)
11    {
12      diff = 0;
13      for (j = 0; j < 128;j+=8)
14        diff += in[j+i];
15      s += ((unsigned short)diff>>3);
16    }
17    if (s != sum)
18      return -1;
19    return 0;
20 }
21
22 /* { dg-final { cleanup-tree-dump "vect" } } */