]> git.ipfire.org Git - thirdparty/gcc.git/commit
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, 22 Apr 2021 14:04:38 +0000 (16:04 +0200)
commita66e756ea9cf1ce8f2c73bd29bfe7ed785fae89a
treee293b05c8254496336a1a82811e91e1dbadf2335
parent455f165fd86f50163d2147b669edcc2e9bf5b0f8
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.

(cherry picked from commit c925d4cebf817905c237aa2d93887f254b4a74f4)
gcc/omp-expand.c
gcc/testsuite/c-c++-common/gomp/doacross-4.c [new file with mode: 0644]