openmp: Fix ICE with broken doacross loop [PR98205]
authorJakub Jelinek <jakub@redhat.com>
Thu, 10 Dec 2020 10:07:07 +0000 (11:07 +0100)
committerJakub Jelinek <jakub@redhat.com>
Thu, 10 Dec 2020 10:07:07 +0000 (11:07 +0100)
commita2a17ae7d85e420db5fe0c7ab2f59a470e2c7a78
tree9bd6939a389968ad65615ecccf63996fb4735910
parent154e9b831b6fc7d8493b5b0d56b9c5cdeff968e9
openmp: Fix ICE with broken doacross loop [PR98205]

If the loop body doesn't ever continue, we don't have a bb to insert the
updates.  Fixed by not adding them at all in that case.

2020-12-10  Jakub Jelinek  <jakub@redhat.com>

PR middle-end/98205
* omp-expand.c (expand_omp_for_generic): Fix up broken_loop handling.

* c-c++-common/gomp/doacross-4.c: New test.
gcc/omp-expand.c
gcc/testsuite/c-c++-common/gomp/doacross-4.c [new file with mode: 0644]