aboutsummaryrefslogtreecommitdiff
path: root/gcc/expr.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2001-12-05 15:15:37 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2001-12-05 15:15:37 +0100
commit7254c5fa7355f071477c329a9495a726810a5d63 (patch)
tree09544232bf9869e15d37e4b95921998c6b9431b3 /gcc/expr.c
parent822baa84c86a39c89b6f066210d645f36f4f3eee (diff)
downloadgcc-7254c5fa7355f071477c329a9495a726810a5d63.zip
gcc-7254c5fa7355f071477c329a9495a726810a5d63.tar.gz
gcc-7254c5fa7355f071477c329a9495a726810a5d63.tar.bz2
expr.c (expand_expr): When checking promoted value, use DECL_MODE (exp) and not mode.
* expr.c (expand_expr): When checking promoted value, use DECL_MODE (exp) and not mode. * g++.dg/other/anon-union.C: New test. From-SVN: r47674
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 af36b3b..e988c4c 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. */