Merge reload-branch up to revision 101000
[official-gcc.git] / gcc / testsuite / gcc.dg / 20050524-1.c
blobf15c51d628a742c18dbdd175ff41a299066d88ba
1 /* This test case used to abort due to a reload bug with
2 elimination offsets. */
4 /* { dg-do run { target s390*-*-* } } */
5 /* { dg-options "-O2 -mpacked-stack" } */
7 extern void abort (void);
9 double bar (double) __attribute__ ((noinline));
10 double bar (double x) { return x; }
12 double
13 foo (int j, double f0, double f2, double f4, double f6, double x) __attribute__ ((noinline));
15 double
16 foo (int j, double f0, double f2, double f4, double f6, double x)
18 if (j)
19 return bar (x) + 4.0;
20 else
21 return bar (x);
24 int
25 main (void)
27 if (foo (0, 0, 0, 0, 0, 10) != 10)
28 abort ();
29 if (foo (1, 0, 0, 0, 0, 10) != 14)
30 abort ();
32 return 0;