re PR middle-end/69183 (ICE when using OpenMP PRIVATE keyword in OMP DO loop not...
authorJakub Jelinek <jakub@gcc.gnu.org>
Wed, 23 Nov 2016 19:28:41 +0000 (20:28 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Wed, 23 Nov 2016 19:28:41 +0000 (20:28 +0100)
commitc39dad64b8b3df3da912134d339ef5fe5c45fad0
tree5d06b113ac247902a7dfb85ee5f1f7021a0eaf1d
parent62567da0dfe77e3c708620544f2f395f64caca13
re PR middle-end/69183 (ICE when using OpenMP PRIVATE keyword in OMP DO loop not explicitly encapsulated in OMP PARALLEL region)

PR middle-end/69183
* omp-low.c (build_outer_var_ref): Change lastprivate argument
to code, pass it recursively, adjust uses.  For OMP_CLAUSE_PRIVATE
on worksharing constructs, treat it like clauses on simd construct.
Formatting fix.
(lower_rec_input_clauses): For OMP_CLAUSE_PRIVATE_OUTER_REF pass
OMP_CLAUSE_PRIVATE as last argument to build_outer_var_ref.
(lower_lastprivate_clauses): Pass OMP_CLAUSE_LASTPRIVATE instead
of true as last argument to build_outer_var_ref.

* gfortran.dg/gomp/pr69183.f90: New test.

From-SVN: r242793
gcc/ChangeLog
gcc/omp-low.c
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/gomp/pr69183.f90 [new file with mode: 0644]