OSDN Git Service

Fix PR 17408 and PR 17409.
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.c-torture / execute / 20030914-1.c
1 /* On IRIX 6, PB is passed partially in registers and partially on the
2    stack, with an odd number of words in the register part.  Check that
3    the long double stack argument (PC) is still accessed properly.  */
4
5 struct s { int val[16]; };
6
7 long double f (int pa, struct s pb, long double pc)
8 {
9   int i;
10
11   for (i = 0; i < 16; i++)
12     pc += pb.val[i];
13   return pc;
14 }
15
16 int main ()
17 {
18   struct s x;
19   int i;
20
21   for (i = 0; i < 16; i++)
22     x.val[i] = i + 1;
23   if (f (1, x, 10000.0L) != 10136.0L)
24     abort ();
25   exit (0);
26 }