PR tree-optimization/84740
[official-gcc.git] / gcc / testsuite / gcc.dg / vect / pr60196-1.c
blob07bca49fb14a474bdb03c5b4e113f8b815a6661e
1 /* PR tree-optimization/63189 */
2 /* { dg-additional-options "-fwrapv" } */
4 #include "tree-vect.h"
6 __attribute__((noinline, noclone)) static int
7 bar (const short *a, int len)
9 int x;
10 int x1 = 0;
12 for (x = 0; x < len; x++)
13 x1 += x * a[x];
14 return x1;
17 __attribute__((noinline, noclone)) void
18 foo (void)
20 short stuff[9] = {1, 1, 1, 1, 1, 1, 1, 1, 1 };
21 if (bar (stuff, 9) != 36)
22 abort ();
25 int
26 main ()
28 check_vect ();
29 foo ();
30 return 0;