| 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 |
void abort (void); |
| 6 |
void exit (int); |
| 7 |
|
| 8 |
struct s { int val[16]; }; |
| 9 |
|
| 10 |
long double f (int pa, struct s pb, long double pc) |
| 11 |
{ |
| 12 |
int i; |
| 13 |
|
| 14 |
for (i = 0; i < 16; i++) |
| 15 |
pc += pb.val[i]; |
| 16 |
return pc; |
| 17 |
} |
| 18 |
|
| 19 |
int main () |
| 20 |
{ |
| 21 |
struct s x; |
| 22 |
int i; |
| 23 |
|
| 24 |
for (i = 0; i < 16; i++) |
| 25 |
x.val[i] = i + 1; |
| 26 |
if (f (1, x, 10000.0L) != 10136.0L) |
| 27 |
abort (); |
| 28 |
exit (0); |
| 29 |
} |