1/* PR tree-optimization/63189 */
2/* { dg-additional-options "-fwrapv" } */
3
4#include "tree-vect.h"
5
6__attribute__((noinline, noclone)) static int
7bar (const short *a, int len)
8{
9  int x;
10  int x1 = 0;
11
12  for (x = 0; x < len; x++)
13    x1 += x * a[x];
14  return x1;
15}
16
17__attribute__((noinline, noclone)) void
18foo (void)
19{
20  short stuff[9] = {1, 1, 1, 1, 1, 1, 1, 1, 1 };
21  if (bar (stuff, 9) != 36)
22    abort ();
23}
24
25int
26main ()
27{
28  check_vect ();
29  foo ();
30  return 0;
31}
32
33/* { dg-final { cleanup-tree-dump "vect" } } */
34