https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93553
--- Comment #9 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Jakub Jelinek <ja...@gcc.gnu.org>: https://gcc.gnu.org/g:676b5525e8333005bdc1c596ed086f1da27a450f commit r11-2615-g676b5525e8333005bdc1c596ed086f1da27a450f Author: Jakub Jelinek <ja...@redhat.com> Date: Sat Aug 8 11:10:30 2020 +0200 openmp: Handle clauses with gimple sequences in convert_nonlocal_omp_clauses properly If the walk_body on the various sequences of reduction, lastprivate and/or linear clauses needs to create a temporary variable, we should declare that variable in that sequence rather than outside, where it would need to be privatized inside of the construct. 2020-08-08 Jakub Jelinek <ja...@redhat.com> PR fortran/93553 * tree-nested.c (convert_nonlocal_omp_clauses): For OMP_CLAUSE_REDUCTION, OMP_CLAUSE_LASTPRIVATE and OMP_CLAUSE_LINEAR save info->new_local_var_chain around walks of the clause gimple sequences and declare_vars if needed into the sequence. 2020-08-08 Tobias Burnus <tob...@codesourcery.com> PR fortran/93553 * testsuite/libgomp.fortran/pr93553.f90: New test.