aboutsummaryrefslogtreecommitdiff
path: root/gcc/expr.c
diff options
context:
space:
mode:
authorAndrew MacLeod <amacleod@redhat.com>2002-03-22 18:13:45 +0000
committerAndrew Macleod <amacleod@gcc.gnu.org>2002-03-22 18:13:45 +0000
commite8dcd824f715e37e73e52e63600d57f6ca5e70cb (patch)
tree226fb066355caba36fb25c64a44615ef8daf48b3 /gcc/expr.c
parent7614d20b9e71d2c20bec63929377f0d1435389aa (diff)
downloadgcc-e8dcd824f715e37e73e52e63600d57f6ca5e70cb.zip
gcc-e8dcd824f715e37e73e52e63600d57f6ca5e70cb.tar.gz
gcc-e8dcd824f715e37e73e52e63600d57f6ca5e70cb.tar.bz2
fix g++ testcase crash namedret1.c on sparcv9 and s390
2002-03-22 Andrew MacLeod <amacleod@redhat.com> * expr.c (expand_expr): A RESULT_DECL is part of a call. From-SVN: r51177
Diffstat (limited to 'gcc/expr.c')
-rw-r--r--gcc/expr.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/expr.c b/gcc/expr.c
index 876dfb9..3913ebd 100644
--- a/gcc/expr.c
+++ b/gcc/expr.c
@@ -6289,7 +6289,8 @@ expand_expr (exp, target, tmode, modifier)
/* Get the signedness used for this variable. Ensure we get the
same mode we got when the variable was declared. */
if (GET_MODE (DECL_RTL (exp))
- != promote_mode (type, DECL_MODE (exp), &unsignedp, 0))
+ != promote_mode (type, DECL_MODE (exp), &unsignedp,
+ (TREE_CODE (exp) == RESULT_DECL ? 1 : 0)))
abort ();
temp = gen_lowpart_SUBREG (mode, DECL_RTL (exp));