This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

A patch for reg-stack.c


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))
     {


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]