]> git.ipfire.org Git - thirdparty/gcc.git/commit
openmp: Notice reduction decl in outer contexts after adding it to shared [PR93515]
authorJakub Jelinek <jakub@redhat.com>
Thu, 6 Feb 2020 08:15:13 +0000 (09:15 +0100)
committerJakub Jelinek <jakub@redhat.com>
Thu, 13 Feb 2020 20:44:14 +0000 (21:44 +0100)
commitd3266b1311723841ec553277f1fb6bfddef8809d
treea42c6ee2cab239304d895afb088c447a77f79d8c
parent520b364da0b20dcb492229757190cc3f30322052
openmp: Notice reduction decl in outer contexts after adding it to shared [PR93515]

If we call omp_add_variable, following omp_notice_variable will already find it
on that construct and not go through outer constructs, the following patch fixes that.
Note, this still doesn't follow OpenMP 5.0 semantics on target combined with other
constructs with reduction/lastprivate/linear clauses, will handle that for GCC11.

2020-02-06  Jakub Jelinek  <jakub@redhat.com>

PR libgomp/93515
* gimplify.c (gimplify_scan_omp_clauses) <do_notice>: If adding
shared clause, call omp_notice_variable on outer context if any.
gcc/ChangeLog
gcc/gimplify.c