diff options
Diffstat (limited to 'gcc/testsuite/gcc.c-torture/execute/20030914-1.c')
-rw-r--r-- | gcc/testsuite/gcc.c-torture/execute/20030914-1.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.c-torture/execute/20030914-1.c b/gcc/testsuite/gcc.c-torture/execute/20030914-1.c new file mode 100644 index 000000000..ab1c1541d --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/execute/20030914-1.c @@ -0,0 +1,26 @@ +/* On IRIX 6, PB is passed partially in registers and partially on the + stack, with an odd number of words in the register part. Check that + the long double stack argument (PC) is still accessed properly. */ + +struct s { int val[16]; }; + +long double f (int pa, struct s pb, long double pc) +{ + int i; + + for (i = 0; i < 16; i++) + pc += pb.val[i]; + return pc; +} + +int main () +{ + struct s x; + int i; + + for (i = 0; i < 16; i++) + x.val[i] = i + 1; + if (f (1, x, 10000.0L) != 10136.0L) + abort (); + exit (0); +} |