mirror of git://gcc.gnu.org/git/gcc.git
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
This commit is contained in:
parent
af9f5d95df
commit
871dae3465
|
|
@ -1,5 +1,9 @@
|
||||||
2015-02-04 Alexandre Oliva <aoliva@redhat.com>
|
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
|
PR debug/64817
|
||||||
* simplify-rtx.c (simplify_binary_operation_1): Simplify one
|
* simplify-rtx.c (simplify_binary_operation_1): Simplify one
|
||||||
of two XORs that have an intervening AND or IOR.
|
of two XORs that have an intervening AND or IOR.
|
||||||
|
|
|
||||||
|
|
@ -3911,7 +3911,6 @@ expand_debug_expr (tree exp)
|
||||||
|
|
||||||
binary:
|
binary:
|
||||||
case tcc_binary:
|
case tcc_binary:
|
||||||
case tcc_comparison:
|
|
||||||
op1 = expand_debug_expr (TREE_OPERAND (exp, 1));
|
op1 = expand_debug_expr (TREE_OPERAND (exp, 1));
|
||||||
if (!op1)
|
if (!op1)
|
||||||
return NULL_RTX;
|
return NULL_RTX;
|
||||||
|
|
@ -3925,6 +3924,10 @@ expand_debug_expr (tree exp)
|
||||||
return NULL_RTX;
|
return NULL_RTX;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case tcc_comparison:
|
||||||
|
unsignedp = TYPE_UNSIGNED (TREE_TYPE (TREE_OPERAND (exp, 0)));
|
||||||
|
goto binary;
|
||||||
|
|
||||||
case tcc_type:
|
case tcc_type:
|
||||||
case tcc_statement:
|
case tcc_statement:
|
||||||
gcc_unreachable ();
|
gcc_unreachable ();
|
||||||
|
|
@ -4006,7 +4009,7 @@ expand_debug_expr (tree exp)
|
||||||
op0 = copy_rtx (op0);
|
op0 = copy_rtx (op0);
|
||||||
|
|
||||||
if (GET_MODE (op0) == BLKmode
|
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,
|
below would ICE. While it is likely a FE bug,
|
||||||
try to be robust here. See PR43166. */
|
try to be robust here. See PR43166. */
|
||||||
|| mode == BLKmode
|
|| mode == BLKmode
|
||||||
|
|
@ -5285,7 +5288,7 @@ expand_gimple_basic_block (basic_block bb, bool disable_tail_calls)
|
||||||
|
|
||||||
if (have_debug_uses)
|
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
|
statement, and where OP is used in further debug
|
||||||
instructions. Generate a debug temporary, and
|
instructions. Generate a debug temporary, and
|
||||||
replace all uses of OP in debug insns with that
|
replace all uses of OP in debug insns with that
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,8 @@
|
||||||
|
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>
|
2015-02-04 Jakub Jelinek <jakub@redhat.com>
|
||||||
Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
|
Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,13 @@
|
||||||
|
/* 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);
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue