aboutsummaryrefslogtreecommitdiff
path: root/gcc/omp-low.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2013-11-26 21:38:10 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2013-11-26 21:38:10 +0100
commit01dde9b0e98f435232dd99d8128cd1087066d5ef (patch)
tree697c5fd4bd088240771a52a5b6bab0b09daef6b6 /gcc/omp-low.c
parentda719a9f8e8e542e78460c648f36649164666e9d (diff)
downloadgcc-01dde9b0e98f435232dd99d8128cd1087066d5ef.zip
gcc-01dde9b0e98f435232dd99d8128cd1087066d5ef.tar.gz
gcc-01dde9b0e98f435232dd99d8128cd1087066d5ef.tar.bz2
re PR middle-end/59152 (ICE: loop 2's latch does not have an edge to its header with -fopenmp -fipa-pure-const)
PR middle-end/59152 * omp-low.c (expand_omp_for_static_chunk): Don't set loop->latch for the inner loop if collapse_bb is non-NULL. (expand_omp_simd): Use cont_bb rather than e->dest as latch. * c-c++-common/gomp/pr59152.c: New test. From-SVN: r205410
Diffstat (limited to 'gcc/omp-low.c')
-rw-r--r--gcc/omp-low.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/omp-low.c b/gcc/omp-low.c
index df9cd25..7abe456 100644
--- a/gcc/omp-low.c
+++ b/gcc/omp-low.c
@@ -6491,7 +6491,8 @@ expand_omp_for_static_chunk (struct omp_region *region,
{
struct loop *loop = alloc_loop ();
loop->header = body_bb;
- loop->latch = cont_bb;
+ if (collapse_bb == NULL)
+ loop->latch = cont_bb;
add_loop (loop, trip_loop);
}
}
@@ -6771,7 +6772,7 @@ expand_omp_simd (struct omp_region *region, struct omp_for_data *fd)
{
struct loop *loop = alloc_loop ();
loop->header = l1_bb;
- loop->latch = e->dest;
+ loop->latch = cont_bb;
add_loop (loop, l1_bb->loop_father);
if (safelen == NULL_TREE)
loop->safelen = INT_MAX;