aboutsummaryrefslogtreecommitdiff
path: root/gcc/omp-expand.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/omp-expand.c')
-rw-r--r--gcc/omp-expand.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/omp-expand.c b/gcc/omp-expand.c
index a1e668d99d2..549a5db000a 100644
--- a/gcc/omp-expand.c
+++ b/gcc/omp-expand.c
@@ -5628,6 +5628,14 @@ expand_oacc_for (struct omp_region *region, struct omp_for_data *fd)
split->flags ^= EDGE_FALLTHRU | EDGE_TRUE_VALUE;
+ /* Add a dummy exit for the tiled block when cont_bb is missing. */
+ if (cont_bb == NULL)
+ {
+ edge e = make_edge (body_bb, exit_bb, EDGE_FALSE_VALUE);
+ e->probability = PROB_EVEN;
+ split->probability = PROB_EVEN;
+ }
+
/* Initialize the user's loop vars. */
gsi = gsi_start_bb (elem_body_bb);
expand_oacc_collapse_vars (fd, true, &gsi, counts, e_offset);