aboutsummaryrefslogtreecommitdiff
path: root/gcc/gimplify.c
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2015-10-14 12:59:15 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2015-10-14 12:59:15 +0000
commitc3bea07622b9a0ffc7a6724c06a04c9801642dfd (patch)
tree1c951111002e36e36791d6b8c618654105a3bdc9 /gcc/gimplify.c
parent0155ad4011c58e3608d88e76d1fa0f628ccedcdb (diff)
downloadgcc-c3bea07622b9a0ffc7a6724c06a04c9801642dfd.zip
gcc-c3bea07622b9a0ffc7a6724c06a04c9801642dfd.tar.gz
gcc-c3bea07622b9a0ffc7a6724c06a04c9801642dfd.tar.bz2
re PR tree-optimization/67915 (ICE on valid code at -O2 and -O3 on x86_64-linux-gnu)
2015-10-14 Richard Biener <rguenther@suse.de> PR tree-optimization/67915 * match.pd: Handle comparisons of addresses of STRING_CSTs. * gimplify.c (gimplify_cond_expr): Fold the GIMPLE conds we build. * tree-cfgcleanup.c (cleanup_control_expr_graph): Remove GENERIC stmt folding in favor of GIMPLE one. * gcc.dg/torture/pr67915.c: New testcase. From-SVN: r228810
Diffstat (limited to 'gcc/gimplify.c')
-rw-r--r--gcc/gimplify.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/gcc/gimplify.c b/gcc/gimplify.c
index 4a9f7fd..071645f 100644
--- a/gcc/gimplify.c
+++ b/gcc/gimplify.c
@@ -3152,11 +3152,12 @@ gimplify_cond_expr (tree *expr_p, gimple_seq *pre_p, fallback_t fallback)
gimple_cond_get_ops_from_tree (COND_EXPR_COND (expr), &pred_code, &arm1,
&arm2);
-
cond_stmt = gimple_build_cond (pred_code, arm1, arm2, label_true,
- label_false);
-
+ label_false);
gimplify_seq_add_stmt (&seq, cond_stmt);
+ gimple_stmt_iterator gsi = gsi_last (seq);
+ maybe_fold_stmt (&gsi);
+
label_cont = NULL_TREE;
if (!have_then_clause_p)
{