Commit 52270a3c by Diego Novillo Committed by Diego Novillo

re PR tree-optimization/23476 (ICE in VRP, remove_range_assertions)


	PR 23476
	* tree-cfgcleanup.c (cleanup_control_expr_graph): Fold the
	conditional expression before testing its value.

	PR 23476
	* gcc.c-torture/compile/pr23476.c: New test.

From-SVN: r103290
parent 5c1c631e
2005-08-19 Diego Novillo <dnovillo@redhat.com>
PR 23476
* tree-cfgcleanup.c (cleanup_control_expr_graph): Fold the
conditional expression before testing its value.
2005-08-19 Diego Novillo <dnovillo@redhat.com>
* doc/invoke.texi: Fix documentation for -ftree-dominator-opts.
2005-08-19 Devang Patel <dpatel@apple.com>
......
2005-08-19 Diego Novillo <dnovillo@redhat.com>
PR 23476
* gcc.c-torture/compile/pr23476.c: New test.
2005-08-19 Devang Patel <dpatel@apple.com>
PR tree-optimization/23048
......
int h(int);
int t;
static inline int f(const int i)
{
int tt = i;
_Bool a = i < t;
if (a)
return h(t);
return 9;
}
int g(void)
{
return f(0x7FFFFFFF);
}
......@@ -81,11 +81,11 @@ cleanup_control_expr_graph (basic_block bb, block_stmt_iterator bsi)
switch (TREE_CODE (expr))
{
case COND_EXPR:
val = COND_EXPR_COND (expr);
val = fold (COND_EXPR_COND (expr));
break;
case SWITCH_EXPR:
val = SWITCH_COND (expr);
val = fold (SWITCH_COND (expr));
if (TREE_CODE (val) != INTEGER_CST)
return false;
break;
......
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