1 /* Testcase extracted from test 183.equake in SPEC CPU2000. */
2 double Ke[2], ds[2];
3
foo(double Ke[2],int i,double ds[],int column)4 void foo(double Ke[2], int i, double ds[], int column)
5 {
6 double tt, ts;
7 int j;
8
9 for (j = 0; j < 2; j++)
10 {
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;
18 }
19 }
20
21 extern void abort ();
22
23 int
main()24 main ()
25 {
26 int i, j;
27
28 ds[0] = 1.0;
29 ds[1] = 1.0;
30
31 foo(Ke, 0, ds, -1);
32
33 if ((int) Ke[0] != 124)
34 abort ();
35
36 return 0;
37 }
38