1/* This test case used to abort due to a reload bug with
2   elimination offsets.  */
3
4/* { dg-do run } */
5/* { dg-options "-O2 -mpacked-stack" } */
6
7extern void abort (void);
8
9double bar (double) __attribute__ ((noinline));
10double bar (double x) { return x; }
11
12double
13foo (int j, double f0, double f2, double f4, double f6, double x) __attribute__ ((noinline));
14
15double
16foo (int j, double f0, double f2, double f4, double f6, double x)
17{
18  if (j)
19    return bar (x) + 4.0;
20  else
21    return bar (x);
22}
23
24int
25main (void)
26{
27  if (foo (0, 0, 0, 0, 0, 10) != 10)
28    abort ();
29  if (foo (1, 0, 0, 0, 0, 10) != 14)
30    abort ();
31
32  return 0;
33}
34
35