[backport from gcc-4.7/trunk r184662 <mikpe@it.uu.se>]

gcc/

2012-02-29  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

	PR tree-optimization/52424
	* tree-ssa-dom.c (dom_opt_leave_block): Push a marker before
	calling dom_thread_across_edge.

--- gcc-4.6.3/gcc/tree-ssa-dom.c.~1~	2011-06-30 21:35:45.000000000 +0200
+++ gcc-4.6.3/gcc/tree-ssa-dom.c	2012-03-04 16:58:20.000000000 +0100
@@ -1692,6 +1692,9 @@ dom_opt_leave_block (struct dom_walk_dat
       && (single_succ_edge (bb)->flags & EDGE_ABNORMAL) == 0
       && potentially_threadable_block (single_succ (bb)))
     {
+      /* Push a marker on the stack, which thread_across_edge expects
+	 and will remove.  */
+      VEC_safe_push (tree, heap, const_and_copies_stack, NULL_TREE);
       dom_thread_across_edge (walk_data, single_succ_edge (bb));
     }
   else if ((last = last_stmt (bb))
