PR inline-asm/84742
[official-gcc.git] / gcc / testsuite / gcc.target / s390 / 20050524-1.c
blob7b94fd0f065d0c7fd8326e180192105bbc0c01b8
1 /* This test case used to abort due to a reload bug with
2 elimination offsets. */
4 /* { dg-do run } */
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;