+2014-06-04 Marc Glisse <marc.glisse@inria.fr>
+
+ PR tree-optimization/61385
+ * tree-ssa-phiopt.c (value_replacement): Punt if there are PHI nodes.
+
2014-06-04 Bernd Schmidt <bernds@codesourcery.com>
* lto-wrapper.c (fatal, fatal_perror): Remove functions. All callers
+2014-06-04 Marc Glisse <marc.glisse@inria.fr>
+
+ PR tree-optimization/61385
+ * gcc.dg/tree-ssa/pr61385.c: New file.
+
2014-06-04 Richard Biener <rguenther@suse.de>
PR tree-optimization/60098
--- /dev/null
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+#define assert(x) if (!(x)) __builtin_abort ()
+
+int a, b, c, d, e, f, g;
+
+int
+fn1 ()
+{
+ int *h = &c;
+ for (; c < 1; c++)
+ {
+ int *i = &a, *k = &a;
+ f = 0;
+ if (b)
+ return 0;
+ if (*h)
+ {
+ int **j = &i;
+ *j = 0;
+ d = 0;
+ }
+ else
+ g = e = 0;
+ if (*h)
+ {
+ int **l = &k;
+ *l = &g;
+ }
+ d &= *h;
+ assert (k == &a || k);
+ assert (i);
+ }
+ return 0;
+}
+
+int
+main ()
+{
+ fn1 ();
+ return 0;
+}
&& !POINTER_TYPE_P (TREE_TYPE (arg0))))
return 0;
+ /* Punt if there are (degenerate) PHIs in middle_bb, there should not be. */
+ if (!gimple_seq_empty_p (phi_nodes (middle_bb)))
+ return 0;
+
/* Only transform if it removes the condition. */
if (!single_non_singleton_phi_for_edges (phi_nodes (gimple_bb (phi)), e0, e1))
return 0;