summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/graphite/run-id-pr42644.c
blob: d134b5c3084d4bc5f7f7d325013d2186f72fa12b (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
30
31
32
33
34
35
36
37
/* Testcase extracted from test 183.equake in SPEC CPU2000.  */
double Ke[2], ds[2];

void foo(double Ke[2], int i, double ds[],  int column)
{
  double tt, ts;
  int j;

  for (j = 0; j < 2; j++)
    {
      ++column;
      ts = ds[i];
      if (i == j)
	tt = 123;
      else
	tt = 0;
      Ke[column] = Ke[column] + ts + tt;
    }
}

extern void abort ();

int
main ()
{
  int i, j;

  ds[0] = 1.0;
  ds[1] = 1.0;

  foo(Ke, 0, ds, -1);

  if ((int) Ke[0] != 124)
    abort ();

  return 0;
}