https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69183
--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Author: jakub Date: Wed Nov 23 19:28:41 2016 New Revision: 242793 URL: https://gcc.gnu.org/viewcvs?rev=242793&root=gcc&view=rev Log: 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. Added: trunk/gcc/testsuite/gfortran.dg/gomp/pr69183.f90 Modified: trunk/gcc/ChangeLog trunk/gcc/omp-low.c trunk/gcc/testsuite/ChangeLog