summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/vect/ggc-pr37574.c
blob: 176aa7eafc0b2db4a3b0b09b7a393c2cb5cceac4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/* { dg-do compile } */

#include <stdarg.h>

unsigned short in[40 +128];
int main (void) {
  int i = 0, j = 0;
  unsigned int diff;
  unsigned int s=0,sum=0;
  for (i = 0; i < 40;i++)
   {
     diff = 0;
     for (j = 0; j < 128;j+=8)
       diff += in[j+i];
     s += ((unsigned short)diff>>3);
   }
   if (s != sum)
     return -1;
   return 0;
}

/* { dg-final { cleanup-tree-dump "vect" } } */