Commit aef4aab0 by Richard Biener Committed by Richard Biener

re PR middle-end/70747 (ICE on valid code on x86_64-linux-gnu: verify_gimple failed)

2016-04-21  Richard Biener  <rguenther@suse.de>

	PR middle-end/70747
	* fold-const.c (fold_comparison): Return properly typed
	constant boolean.

	* gcc.dg/pr70747.c: New testcase.

From-SVN: r235335
parent 2359e571
2016-04-21 Richard Biener <rguenther@suse.de>
PR middle-end/70747
* fold-const.c (fold_comparison): Return properly typed
constant boolean.
2016-04-21 Bin Cheng <bin.cheng@arm.com>
PR tree-optimization/70715
......
......@@ -8676,11 +8676,11 @@ fold_comparison (location_t loc, enum tree_code code, tree type,
case EQ_EXPR:
case LE_EXPR:
case LT_EXPR:
return boolean_false_node;
return constant_boolean_node (false, type);
case GE_EXPR:
case GT_EXPR:
case NE_EXPR:
return boolean_true_node;
return constant_boolean_node (true, type);
default:
gcc_unreachable ();
}
......
2016-04-21 Richard Biener <rguenther@suse.de>
PR middle-end/70747
* gcc.dg/pr70747.c: New testcase.
2016-04-21 Bin Cheng <bin.cheng@arm.com>
PR tree-optimization/70715
......
/* { dg-do compile } */
/* { dg-options "-pedantic" } */
int *a, b;
void fn1 ()
{
a = __builtin_malloc (sizeof(int)*2);
b = &a[1] == (0, 0); /* { dg-warning "comparison between pointer and integer" } */
}
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