Commit 871dae34 by Alexandre Oliva Committed by Alexandre Oliva

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
parent af9f5d95
2015-02-04 Alexandre Oliva <aoliva@redhat.com>
PR debug/64817
* cfgexpand.c (expand_debug_expr): Compute unsignedp from
operands for tcc_comparison exprs. Fix typos.
PR debug/64817
* simplify-rtx.c (simplify_binary_operation_1): Simplify one
of two XORs that have an intervening AND or IOR.
......
......@@ -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
......
2015-02-04 Alexandre Oliva <aoliva@redhat.com>
PR debug/64817
* gcc.dg/pr64817-3.c: New.
2015-02-04 Jakub Jelinek <jakub@redhat.com>
Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
......
/* PR debug/64817 */
/* { dg-do compile } */
/* { dg-options "-O3 -g" } */
int a;
void
foo (void)
{
int e;
a = ((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((a & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) ^ 1;
e = (a > 0);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment