2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / testsuite / gcc.c-torture / execute / 20030914-1.c
blobab1c1541df0a2e4d4bfd9b84c61cfdd3cfafcc47
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. */
5 struct s { int val[16]; };
7 long double f (int pa, struct s pb, long double pc)
9 int i;
11 for (i = 0; i < 16; i++)
12 pc += pb.val[i];
13 return pc;
16 int main ()
18 struct s x;
19 int i;
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);