aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2011-11-30 22:59:04 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2011-11-30 22:59:04 +0100
commit336ead04abf0b0cf45dbcc1172e35330a5fded40 (patch)
treea216f979d556248ae6aaf835392bed7085a3b65d /gcc
parent9abfe98649d444d324f707d25071bcd8f31282e8 (diff)
downloadgcc-336ead04abf0b0cf45dbcc1172e35330a5fded40.zip
gcc-336ead04abf0b0cf45dbcc1172e35330a5fded40.tar.gz
gcc-336ead04abf0b0cf45dbcc1172e35330a5fded40.tar.bz2
re PR middle-end/51089 (internal compiler error: verify_flow_info failed)
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. * gfortran.dg/gomp/pr51089.f90: New test. From-SVN: r181859
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gfortran.dg/gomp/pr51089.f9016
-rw-r--r--gcc/tree-eh.c34
4 files changed, 44 insertions, 18 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index f225378..a5262ab 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,10 @@
+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
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 6731259..1df8f77 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2011-11-30 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/51089
+ * gfortran.dg/gomp/pr51089.f90: New test.
+
2011-11-30 Andrew Pinski <apinski@cavium.com>
* gcc.dg/pr51321.c: New testcase.
diff --git a/gcc/testsuite/gfortran.dg/gomp/pr51089.f90 b/gcc/testsuite/gfortran.dg/gomp/pr51089.f90
new file mode 100644
index 0000000..83b6dba
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/gomp/pr51089.f90
@@ -0,0 +1,16 @@
+! 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
diff --git a/gcc/tree-eh.c b/gcc/tree-eh.c
index 5faeefe..57abca8 100644
--- a/gcc/tree-eh.c
+++ b/gcc/tree-eh.c
@@ -3653,6 +3653,22 @@ cleanup_empty_eh_merge_phis (basic_block new_bb, basic_block old_bb,
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);
@@ -3815,8 +3831,6 @@ cleanup_empty_eh_unsplit (basic_block bb, edge e_out, eh_landing_pad lp)
{
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
@@ -3839,22 +3853,6 @@ cleanup_empty_eh_unsplit (basic_block bb, edge e_out, eh_landing_pad lp)
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))
{