summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/graphite/pr46761.c
blob: f45398a2b479a25f71c720e185e21557e3bc2a6e (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 run } */
/* { dg-options "-O -fgraphite-identity" } */

#define N 128

int
main ()
{
  int arr[N], i, s = 0;
  for (i = 0; i < N; i++)
    arr[i] = i;

  for (i = 0; i < N; i++)
    if (arr[i] != i)
      __builtin_abort ();

  for (i = 0; i < N; i++)
    s += arr[i];
  if (s != (N * (N - 1)) / 2)
    __builtin_abort ();
  return 0;
}