https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93554
--- Comment #3 from Tobias Burnus <burnus at gcc dot gnu.org> ---
Draft patch, lightly tested:
--- a/gcc/omp-expand.c
+++ b/gcc/omp-expand.c
@@ -6029,10 +6029,7 @@ expand_oacc_for (struct omp_region *region, struct
omp_for_data *fd)
basic_block cont_bb = region->cont; /* BB ending in OMP_CONTINUE */
basic_block bottom_bb = NULL;
- /* entry_bb has two sucessors; the branch edge is to the exit
- block, fallthrough edge to body. */
- gcc_assert (EDGE_COUNT (entry_bb->succs) == 2
- && BRANCH_EDGE (entry_bb)->dest == exit_bb);
+ gcc_assert (EDGE_COUNT (entry_bb->succs) == 2);
/* If cont_bb non-NULL, it has 2 successors. The branch successor is
body_bb, or to a block whose only successor is the body_bb. Its
@@ -6043,7 +6040,7 @@ expand_oacc_for (struct omp_region *region, struct
omp_for_data *fd)
basic_block body_bb = FALLTHRU_EDGE (entry_bb)->dest;
basic_block bed = BRANCH_EDGE (cont_bb)->dest;
- gcc_assert (FALLTHRU_EDGE (cont_bb)->dest == exit_bb);
+ gcc_assert (EDGE_COUNT (cont_bb->succs) == 2);
gcc_assert (bed == body_bb || single_succ_edge (bed)->dest == body_bb);
}
else