From dc5752338ba869ec407f1d97b0d47793be431239 Mon Sep 17 00:00:00 2001 From: Richard Guenther Date: Thu, 4 Oct 2007 09:37:04 +0000 Subject: re PR tree-optimization/33627 (ICE in verify_stmts compiling abiword) 2007-10-04 Richard Guenther PR tree-optimization/33627 * tree-gimple.h (canonicalize_cond_expr_cond): Declare. * tree-gimple.c (canonicalize_cond_expr_cond): New function, split out from ... * tree-ssa-forwprop.c (combine_cond_expr_cond): ... here. * tree-ssa-ifcombine.c (ifcombine_iforif): Use it. * g++.dg/torture/pr33627.C: New testcase. From-SVN: r129004 --- gcc/tree-ssa-ifcombine.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'gcc/tree-ssa-ifcombine.c') diff --git a/gcc/tree-ssa-ifcombine.c b/gcc/tree-ssa-ifcombine.c index f52585c..eef6f22 100644 --- a/gcc/tree-ssa-ifcombine.c +++ b/gcc/tree-ssa-ifcombine.c @@ -483,6 +483,9 @@ ifcombine_iforif (basic_block inner_cond_bb, basic_block outer_cond_bb) /* Do it. */ t = fold_build2 (code, boolean_type_node, TREE_OPERAND (ccond2, 0), TREE_OPERAND (ccond2, 1)); + t = canonicalize_cond_expr_cond (t); + if (!t) + return false; COND_EXPR_COND (inner_cond) = t; update_stmt (inner_cond); -- cgit v1.1