diff options
author | Loren J. Rittle <ljrittle@gcc.gnu.org> | 2003-01-31 21:59:38 +0000 |
---|---|---|
committer | Loren J. Rittle <ljrittle@gcc.gnu.org> | 2003-01-31 21:59:38 +0000 |
commit | 7c712dcc2b30ee6466a89ba586c9e00c4f378794 (patch) | |
tree | f983552ee2d95d407edce08e7d327f4970aea0e0 /gcc | |
parent | 072b0db2e39f37adce028d165429ce6fec61e0da (diff) | |
download | gcc-7c712dcc2b30ee6466a89ba586c9e00c4f378794.zip gcc-7c712dcc2b30ee6466a89ba586c9e00c4f378794.tar.gz gcc-7c712dcc2b30ee6466a89ba586c9e00c4f378794.tar.bz2 |
re PR target/9506 (ABI breakage: structure return)
PR c/9506
* i386.c (override_options): Use DEFAULT_PCC_STRUCT_RETURN.
* gcc.dg/struct-ret-libc.c: New test.
From-SVN: r62204
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); +} |