+2011-01-21 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/47355
+ * tree-eh.c (cleanup_empty_eh_merge_phis): Give up if
+ NOP has non-debug uses beyond PHIs in new_bb.
+
2011-01-21 Alexandre Oliva <aoliva@redhat.com>
PR debug/47106
+2011-01-21 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/47355
+ * g++.dg/opt/pr47355.C: New test.
+
2011-01-21 Richard Guenther <rguenther@suse.de>
* gcc.dg/tree-ssa/pr47392.c: Make test non-static instead of
/* If we did find the corresponding PHI, copy those inputs. */
if (ophi)
{
+ /* If NOP is used somewhere else beyond phis in new_bb, give up. */
+ if (!has_single_use (nop))
+ {
+ imm_use_iterator imm_iter;
+ use_operand_p use_p;
+
+ FOR_EACH_IMM_USE_FAST (use_p, imm_iter, nop)
+ {
+ if (!gimple_debug_bind_p (USE_STMT (use_p))
+ && (gimple_code (USE_STMT (use_p)) != GIMPLE_PHI
+ || gimple_bb (USE_STMT (use_p)) != new_bb))
+ goto fail;
+ }
+ }
bitmap_set_bit (ophi_handled, SSA_NAME_VERSION (nop));
FOR_EACH_EDGE (e, ei, old_bb->preds)
{