OSDN Git Service

* reg-stack.c (stack_result): Aggregates are not returned in
authorlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 19 Oct 1999 08:12:30 +0000 (08:12 +0000)
committerlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 19 Oct 1999 08:12:30 +0000 (08:12 +0000)
        stack registers.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@30081 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/reg-stack.c

index 24096b1..f32d9cf 100644 (file)
@@ -1,3 +1,8 @@
+Tue Oct 19 02:03:00 1999  Jeffrey A Law  (law@cygnus.com)
+
+       * reg-stack.c (stack_result): Aggregates are not returned in
+       stack registers.
+
 Tue Oct 19 01:26:48 1999  Alasdair Baird <alasdair@wildcat.demon.co.uk>
 
        * fold-const.c (fold): Fix thinko in x+(-0) -> x transformation.
index 0cbc5da..d1bceef 100644 (file)
@@ -1192,8 +1192,16 @@ static rtx
 stack_result (decl)
      tree decl;
 {
-  rtx result = DECL_RTL (DECL_RESULT (decl));
+  rtx result;
 
+  /* If the value is supposed to be returned in memory, then clearly
+     it is not returned in a stack register.  */
+  if (aggregate_value_p (DECL_RESULT (decl)))
+    return 0;
+
+  result = DECL_RTL (DECL_RESULT (decl));
+  /* ?!?  What is this code supposed to do?  Can this code actually
+     trigger if we kick out aggregates above?  */
   if (result != 0
       && ! (GET_CODE (result) == REG
            && REGNO (result) < FIRST_PSEUDO_REGISTER))