aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/vect/pr49771.c
blob: 1d8b9b34dd7b24f4aeba06f463e20856f1904afd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
extern void abort (void);

#include <stdarg.h>
#include "tree-vect.h"

static int a[1000];

int
foo (void)
{
  int j;
  int i;
  for (i = 0; i < 1000; i++)
    for (j = 0; j < 1000; j++)
      a[j] = a[i] + 1;
  return a[0];
}

int
main (void)
{
  int res;
  check_vect ();
  res = foo ();
  if (res != 1999)
    abort ();
  return 0;
}