PR libfortran/64770 Segfault when trying to open existing file with status="new".
[official-gcc.git] / gcc / testsuite / gcc.dg / graphite / run-id-pr42644.c
blobd134b5c3084d4bc5f7f7d325013d2186f72fa12b
1 /* Testcase extracted from test 183.equake in SPEC CPU2000. */
2 double Ke[2], ds[2];
4 void foo(double Ke[2], int i, double ds[], int column)
6 double tt, ts;
7 int j;
9 for (j = 0; j < 2; j++)
11 ++column;
12 ts = ds[i];
13 if (i == j)
14 tt = 123;
15 else
16 tt = 0;
17 Ke[column] = Ke[column] + ts + tt;
21 extern void abort ();
23 int
24 main ()
26 int i, j;
28 ds[0] = 1.0;
29 ds[1] = 1.0;
31 foo(Ke, 0, ds, -1);
33 if ((int) Ke[0] != 124)
34 abort ();
36 return 0;