]> git.ipfire.org Git - thirdparty/gcc.git/commit
openmp: Diagnose threadprivate OpenMP loop iterators
authorJakub Jelinek <jakub@redhat.com>
Sat, 30 Oct 2021 06:58:08 +0000 (08:58 +0200)
committerJakub Jelinek <jakub@redhat.com>
Sat, 30 Oct 2021 06:58:08 +0000 (08:58 +0200)
commit6f449bb93b33d63fa8a1b8d021d8d36f27ffe054
treef5a2300e60390e48f330670dc4f4f31b621cb007
parent4c61300f2b243756eb2e8c59997b4675aeb8f37a
openmp: Diagnose threadprivate OpenMP loop iterators

We weren't diagnosing the
The loop iteration variable may not appear in a threadprivate directive.
restriction which used to be in 5.0 just among the Worksharing-Loop
restrictions but in 5.1 it is among Canonical Loop Nest Form restrictions.

This patch diagnoses those.

2021-10-30  Jakub Jelinek  <jakub@redhat.com>

* gimplify.c (gimplify_omp_for): Diagnose threadprivate iterators.

* c-c++-common/gomp/loop-10.c: New test.
gcc/gimplify.c
gcc/testsuite/c-c++-common/gomp/loop-10.c [new file with mode: 0644]