+2011-11-30 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/51089
+ * tree-eh.c (cleanup_empty_eh_merge_phis): Add check to
+ avoid creating duplicate edges here.
+ (cleanup_empty_eh_unsplit): And remove it in the caller.
+
2011-11-30 Andrew Pinski <apinski@cavium.com>
PR c/51321
--- /dev/null
+! PR middle-end/51089
+! { dg-do compile }
+! { dg-options "-O -fexceptions -fopenmp" }
+
+subroutine foo
+ real, allocatable, dimension(:) :: s
+ real, dimension(:, :, :), pointer :: t
+ call fn1 (t, s)
+ call fn2 ()
+end subroutine foo
+subroutine bar
+ integer :: i
+!$omp parallel do
+ do i = 1, 10
+ end do
+end subroutine bar
bitmap rename_virts;
bitmap ophi_handled;
+ /* The destination block must not be a regular successor for any
+ of the preds of the landing pad. Thus, avoid turning
+ <..>
+ | \ EH
+ | <..>
+ | /
+ <..>
+ into
+ <..>
+ | | EH
+ <..>
+ which CFG verification would choke on. See PR45172 and PR51089. */
+ FOR_EACH_EDGE (e, ei, old_bb->preds)
+ if (find_edge (e->src, new_bb))
+ return false;
+
FOR_EACH_EDGE (e, ei, old_bb->preds)
redirect_edge_var_map_clear (e);
{
gimple_stmt_iterator gsi;
tree lab;
- edge_iterator ei;
- edge e;
/* We really ought not have totally lost everything following
a landing pad label. Given that BB is empty, there had better
return false;
}
- /* The destination block must not be a regular successor for any
- of the preds of the landing pad. Thus, avoid turning
- <..>
- | \ EH
- | <..>
- | /
- <..>
- into
- <..>
- | | EH
- <..>
- which CFG verification would choke on. See PR45172. */
- FOR_EACH_EDGE (e, ei, bb->preds)
- if (find_edge (e->src, e_out->dest))
- return false;
-
/* Attempt to move the PHIs into the successor block. */
if (cleanup_empty_eh_merge_phis (e_out->dest, bb, e_out, false))
{