From e8dcd824f715e37e73e52e63600d57f6ca5e70cb Mon Sep 17 00:00:00 2001 From: Andrew MacLeod Date: Fri, 22 Mar 2002 18:13:45 +0000 Subject: fix g++ testcase crash namedret1.c on sparcv9 and s390 2002-03-22 Andrew MacLeod * expr.c (expand_expr): A RESULT_DECL is part of a call. From-SVN: r51177 --- gcc/ChangeLog | 4 ++++ gcc/expr.c | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 7e49d23..c3e96de 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2002-03-22 Andrew MacLeod + + * expr.c (expand_expr): A RESULT_DECL is part of a call. + Fri Mar 22 16:30:42 CET 2002 Jan Hubicka * toplev.c (flag_loop_optimize, flag_crossjumping): 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)); -- cgit v1.1