diff options
author | Alexandre Oliva <aoliva@redhat.com> | 2015-02-04 14:24:00 +0000 |
---|---|---|
committer | Alexandre Oliva <aoliva@gcc.gnu.org> | 2015-02-04 14:24:00 +0000 |
commit | 871dae346542544552ae7c74cd63f7036bd2ad74 (patch) | |
tree | ad0568979dce71bbcf4e2054007589eecb9c4ef2 /gcc/cfgexpand.c | |
parent | af9f5d95df023eab3779878815bc2ad09870f36e (diff) | |
download | gcc-871dae346542544552ae7c74cd63f7036bd2ad74.zip gcc-871dae346542544552ae7c74cd63f7036bd2ad74.tar.gz gcc-871dae346542544552ae7c74cd63f7036bd2ad74.tar.bz2 |
Fix signedness of compares expanding debug exprs.
for gcc/ChangeLog
PR debug/64817
* cfgexpand.c (expand_debug_expr): Compute unsignedp from
operands for tcc_comparison exprs. Fix typos.
for gcc/testsuite/ChangeLog
PR debug/64817
* gcc.dg/pr64817-3.c: New.
From-SVN: r220406
Diffstat (limited to 'gcc/cfgexpand.c')
-rw-r--r-- | gcc/cfgexpand.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/gcc/cfgexpand.c b/gcc/cfgexpand.c index 12021de..7dfe1f6 100644 --- a/gcc/cfgexpand.c +++ b/gcc/cfgexpand.c @@ -3911,7 +3911,6 @@ expand_debug_expr (tree exp) binary: case tcc_binary: - case tcc_comparison: op1 = expand_debug_expr (TREE_OPERAND (exp, 1)); if (!op1) return NULL_RTX; @@ -3925,6 +3924,10 @@ expand_debug_expr (tree exp) return NULL_RTX; break; + case tcc_comparison: + unsignedp = TYPE_UNSIGNED (TREE_TYPE (TREE_OPERAND (exp, 0))); + goto binary; + case tcc_type: case tcc_statement: gcc_unreachable (); @@ -4006,7 +4009,7 @@ expand_debug_expr (tree exp) op0 = copy_rtx (op0); if (GET_MODE (op0) == BLKmode - /* If op0 is not BLKmode, but BLKmode is, adjust_mode + /* If op0 is not BLKmode, but mode is, adjust_mode below would ICE. While it is likely a FE bug, try to be robust here. See PR43166. */ || mode == BLKmode @@ -5285,7 +5288,7 @@ expand_gimple_basic_block (basic_block bb, bool disable_tail_calls) if (have_debug_uses) { - /* OP is a TERed SSA name, with DEF it's defining + /* OP is a TERed SSA name, with DEF its defining statement, and where OP is used in further debug instructions. Generate a debug temporary, and replace all uses of OP in debug insns with that |