aboutsummaryrefslogtreecommitdiff
path: root/gcc/reg-stack.c
diff options
context:
space:
mode:
authorJeffrey A Law <law@cygnus.com>1999-10-19 08:12:30 +0000
committerJeff Law <law@gcc.gnu.org>1999-10-19 02:12:30 -0600
commitf099b1c909de8afb50264af41960c7b18b7320f1 (patch)
tree578267e265ab97310bb2da63879228b37578be7d /gcc/reg-stack.c
parent5603a4873d03f4aa1659fa6900717a7db3d4b39d (diff)
downloadgcc-f099b1c909de8afb50264af41960c7b18b7320f1.zip
gcc-f099b1c909de8afb50264af41960c7b18b7320f1.tar.gz
gcc-f099b1c909de8afb50264af41960c7b18b7320f1.tar.bz2
reg-stack.c (stack_result): Aggregates are not returned in stack registers.
* reg-stack.c (stack_result): Aggregates are not returned in stack registers. From-SVN: r30081
Diffstat (limited to 'gcc/reg-stack.c')
-rw-r--r--gcc/reg-stack.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/gcc/reg-stack.c b/gcc/reg-stack.c
index 0cbc5da..d1bceef 100644
--- a/gcc/reg-stack.c
+++ b/gcc/reg-stack.c
@@ -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))