aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-cfgcleanup.c
diff options
context:
space:
mode:
authorDiego Novillo <dnovillo@redhat.com>2005-08-19 18:08:55 +0000
committerDiego Novillo <dnovillo@gcc.gnu.org>2005-08-19 14:08:55 -0400
commit52270a3cb5384afea9773dfc122412a0fcf5957e (patch)
treee021dbfc4fa5df69c8229745ea8e626e837dee2f /gcc/tree-cfgcleanup.c
parent5c1c631ecfcaa838d1c0d38680b4070ab0372122 (diff)
downloadgcc-52270a3cb5384afea9773dfc122412a0fcf5957e.zip
gcc-52270a3cb5384afea9773dfc122412a0fcf5957e.tar.gz
gcc-52270a3cb5384afea9773dfc122412a0fcf5957e.tar.bz2
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
Diffstat (limited to 'gcc/tree-cfgcleanup.c')
-rw-r--r--gcc/tree-cfgcleanup.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/tree-cfgcleanup.c b/gcc/tree-cfgcleanup.c
index f8bca03..0f8bfc5 100644
--- a/gcc/tree-cfgcleanup.c
+++ b/gcc/tree-cfgcleanup.c
@@ -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;