aboutsummaryrefslogtreecommitdiff
path: root/gcc/function.c
diff options
context:
space:
mode:
authorJim Wilson <wilson@gcc.gnu.org>1996-07-08 15:11:03 -0700
committerJim Wilson <wilson@gcc.gnu.org>1996-07-08 15:11:03 -0700
commite71f7aa5b5c703e5a152c1a6c10ef81e83387a03 (patch)
tree498ad93596ddcb5d2c9f6ea87ea5be6005091b89 /gcc/function.c
parent320aba9c08dfc4c677a90a5c3fa152ff90c674b4 (diff)
downloadgcc-e71f7aa5b5c703e5a152c1a6c10ef81e83387a03.zip
gcc-e71f7aa5b5c703e5a152c1a6c10ef81e83387a03.tar.gz
gcc-e71f7aa5b5c703e5a152c1a6c10ef81e83387a03.tar.bz2
(aggregate_value_p): If hard_function_value returns
a non-REG, then return 0. From-SVN: r12413
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 beaca62..275685e 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++)