This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
A patch for reg-stack.c
- To: egcs-patches at egcs dot cygnus dot com, egcs-bugs at egcs dot cygnus dot com
- Subject: A patch for reg-stack.c
- From: "H . J . Lu" <hjl at valinux dot com>
- Date: Wed, 13 Oct 1999 14:00:38 -0700
- Cc: stevenj at hunsmac dot mit dot edu
I believe this patch should fix
http://egcs.cygnus.com/ml/gcc-bugs/1999-10/msg00011.html
This bug only shows up if flag_pcc_struct_return is 1, which is the
default for Linux since the SVR4 ABI we are using requires the
structure/union be returned in memory regardless the size of
structure/union. I hope it will be fixed in gcc 2.95.2.
Thanks.
--
H.J. Lu (hjl@gnu.org)
Wed Oct 13 12:29:29 1999 H.J. Lu <hjl@gnu.org>
* reg-stack.c (stack_result): Check aggregated return value.
--- ../../import/gcc-2.95.x/egcs/gcc/reg-stack.c Thu Aug 12 08:07:16 1999
+++ gcc/reg-stack.c Wed Oct 13 12:46:18 1999
@@ -1188,7 +1188,7 @@ stack_result (decl)
{
rtx result = DECL_RTL (DECL_RESULT (decl));
- if (result != 0
+ if (result != 0 && !aggregate_value_p (DECL_RESULT (decl))
&& ! (GET_CODE (result) == REG
&& REGNO (result) < FIRST_PSEUDO_REGISTER))
{