summaryrefslogtreecommitdiff
path: root/gcc/function.c
diff options
context:
space:
mode:
authorwilson <wilson@138bc75d-0d04-0410-961f-82ee72b054a4>1996-07-08 22:11:03 +0000
committerwilson <wilson@138bc75d-0d04-0410-961f-82ee72b054a4>1996-07-08 22:11:03 +0000
commit84d69b334ae6a276f945dd6f15ce5abac1af81af (patch)
tree498ad93596ddcb5d2c9f6ea87ea5be6005091b89 /gcc/function.c
parentb1cb5f2fa300449d7d05cf73cdf1abf90e4c356e (diff)
downloadgcc-84d69b334ae6a276f945dd6f15ce5abac1af81af.tar.gz
(aggregate_value_p): If hard_function_value returns
a non-REG, then return 0. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@12413 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/function.c')
-rw-r--r--gcc/function.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/function.c b/gcc/function.c
index beaca62f60a..275685e6ab2 100644
--- a/gcc/function.c
+++ b/gcc/function.c
@@ -3222,6 +3222,12 @@ aggregate_value_p (exp)
/* Make sure we have suitable call-clobbered regs to return
the value in; if not, we must return it in memory. */
reg = hard_function_value (type, 0);
+
+ /* If we have something other than a REG (e.g. a PARALLEL), then assume
+ it is OK. */
+ if (GET_CODE (reg) != REG)
+ return 0;
+
regno = REGNO (reg);
nregs = HARD_REGNO_NREGS (regno, TYPE_MODE (type));
for (i = 0; i < nregs; i++)