diff options
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 9 | ||||
-rw-r--r-- | gcc/config/i386/i386.c | 2 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/struct-ret-libc.c | 16 |
3 files changed, 26 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 9a506e7..1fa4038 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,12 @@ +2003-01-31 Jan Hubicka <jh@suse.cz> + + PR c/9506 + * i386.c (override_options): Use DEFAULT_PCC_STRUCT_RETURN. + +2003-01-31 Loren J. Rittle <ljrittle@acm.org> + + * gcc.dg/struct-ret-libc.c: New test. + 2003-01-31 John David Anglin <dave.anglin@nrc-cnrc.gc.ca> * pa32-regs.h (REGNO_REG_CLASS, REG_CLASS_FROM_LETTER): Delete diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 9abff89..d70054b 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -1118,7 +1118,7 @@ override_options () if (flag_asynchronous_unwind_tables == 2) flag_asynchronous_unwind_tables = 0; if (flag_pcc_struct_return == 2) - flag_pcc_struct_return = 1; + flag_pcc_struct_return = DEFAULT_PCC_STRUCT_RETURN; } #ifdef SUBTARGET_OVERRIDE_OPTIONS diff --git a/gcc/testsuite/gcc.dg/struct-ret-libc.c b/gcc/testsuite/gcc.dg/struct-ret-libc.c new file mode 100644 index 0000000..723e1cd --- /dev/null +++ b/gcc/testsuite/gcc.dg/struct-ret-libc.c @@ -0,0 +1,16 @@ +/* Test evolved from source from Simona Perri <perri@mat.unical.it> + and Gerald Pfeifer<pfeifer@dbai.tuwien.ac.at>. + + Copyright (C) 2003 Free Software Foundation */ + +/* { dg-do run } */ + +#include <stdlib.h> + +int main () +{ + div_t d = div (20, 5); + if ((d.quot != 4) || (d.rem)) + abort (); + exit (0); +} |