summaryrefslogtreecommitdiff
path: root/gcc/expr.c
diff options
context:
space:
mode:
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2001-12-05 14:15:37 +0000
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2001-12-05 14:15:37 +0000
commitac85e396e56c39267d639c0475cdad9f9feba9ce (patch)
tree09544232bf9869e15d37e4b95921998c6b9431b3 /gcc/expr.c
parentb7b3c8bef11512b1d217f740ea9be0dceb7ed673 (diff)
downloadgcc-ac85e396e56c39267d639c0475cdad9f9feba9ce.tar.gz
* expr.c (expand_expr): When checking promoted value, use
DECL_MODE (exp) and not mode. * g++.dg/other/anon-union.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@47674 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/expr.c')
-rw-r--r--gcc/expr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/expr.c b/gcc/expr.c
index af36b3b5820..e988c4c42b2 100644
--- a/gcc/expr.c
+++ b/gcc/expr.c
@@ -6452,7 +6452,7 @@ expand_expr (exp, target, tmode, modifier)
but mark it so that we know that it was already extended. */
if (GET_CODE (DECL_RTL (exp)) == REG
- && GET_MODE (DECL_RTL (exp)) != mode)
+ && GET_MODE (DECL_RTL (exp)) != DECL_MODE (exp))
{
/* Get the signedness used for this variable. Ensure we get the
same mode we got when the variable was declared. */