aboutsummaryrefslogtreecommitdiff
path: root/gcc/cfgexpand.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2010-07-20 14:58:03 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2010-07-20 14:58:03 +0200
commit68eaf35cdb86ba13abb14330cc2a4a9b266242ef (patch)
tree192f1761f965d8bc4c32c0ae966d552d036bd763 /gcc/cfgexpand.c
parent720151cabda2a56418b32c1b048de33670641e45 (diff)
downloadgcc-68eaf35cdb86ba13abb14330cc2a4a9b266242ef.zip
gcc-68eaf35cdb86ba13abb14330cc2a4a9b266242ef.tar.gz
gcc-68eaf35cdb86ba13abb14330cc2a4a9b266242ef.tar.bz2
re PR debug/45003 (VTA issues with sign/zero extension and debug temporaries)
PR debug/45003 * cfgexpand.c (expand_debug_expr) <case NOP_EXPR>: Use ZERO_EXTEND or SIGN_EXTEND depending on TYPE_UNSIGNED of the operand's type instead of the result's type. * gcc.dg/guality/pr45003-1.c: New test. From-SVN: r162336
Diffstat (limited to 'gcc/cfgexpand.c')
-rw-r--r--gcc/cfgexpand.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/cfgexpand.c b/gcc/cfgexpand.c
index d8378ee..3d7bdd0 100644
--- a/gcc/cfgexpand.c
+++ b/gcc/cfgexpand.c
@@ -2427,7 +2427,7 @@ expand_debug_expr (tree exp)
op0 = simplify_gen_subreg (mode, op0, inner_mode,
subreg_lowpart_offset (mode,
inner_mode));
- else if (unsignedp)
+ else if (TYPE_UNSIGNED (TREE_TYPE (TREE_OPERAND (exp, 0))))
op0 = gen_rtx_ZERO_EXTEND (mode, op0);
else
op0 = gen_rtx_SIGN_EXTEND (mode, op0);