]> git.ipfire.org Git - thirdparty/gcc.git/commit
openmp: Fix ICE when splitting invalid depend(source)/depend(sink:vec)
authorJakub Jelinek <jakub@redhat.com>
Tue, 6 Sep 2022 08:16:35 +0000 (10:16 +0200)
committerTobias Burnus <tobias@codesourcery.com>
Tue, 6 Sep 2022 08:16:50 +0000 (10:16 +0200)
commit2148208cd9f85996dd00abebf33fa53396b099e6
tree13328f196ea0487c895b392e1bdbe41f4461d92e
parentbc81271a9f7b03ba3c92672bd3df82974a4c7b60
openmp: Fix ICE when splitting invalid depend(source)/depend(sink:vec)

As we now create OMP_CLAUSE_DOACROSS rather than OMP_CLAUSE_DEPEND when
depend is used with source/sink modifiers, c_omp_split_clauses can see
OMP_CLAUSE_DOACROSS clause too before we diagnose it as erroneous.

The following patch treats it like OMP_CLAUSE_DEPEND during
the splitting but adds an assertion.

2022-09-06  Jakub Jelinek  <jakub@redhat.com>

PR c/106836
* c-omp.cc (c_omp_split_clauses): Handle OMP_CLAUSE_DOACROSS.

* c-c++-common/gomp/pr106836.c: New test.

(cherry picked from commit 1bf8b7adc2de6f2ddaffa3af131b6855ae3e3793)
gcc/c-family/ChangeLog.omp
gcc/c-family/c-omp.cc
gcc/testsuite/ChangeLog.omp
gcc/testsuite/c-c++-common/gomp/pr106836.c [new file with mode: 0644]