]> gcc.gnu.org Git - gcc.git/commit
openmp: Handle clauses with gimple sequences in convert_nonlocal_omp_clauses properly
authorJakub Jelinek <jakub@redhat.com>
Sat, 8 Aug 2020 09:10:30 +0000 (11:10 +0200)
committerJakub Jelinek <jakub@redhat.com>
Tue, 25 Aug 2020 14:36:39 +0000 (16:36 +0200)
commitcbde60ab63e7b94a664fb8fef8640d0d6a63b13c
tree8648aa0a9ce81b6192faab24ef5a2a0b3dbd25f1
parentfa6563471f5c9f96d2e446b15eb7aa770b4b4f17
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  <jakub@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  <tobias@codesourcery.com>

PR fortran/93553
* testsuite/libgomp.fortran/pr93553.f90: New test.

(cherry picked from commit 676b5525e8333005bdc1c596ed086f1da27a450f)
gcc/tree-nested.c
libgomp/testsuite/libgomp.fortran/pr93553.f90 [new file with mode: 0644]
This page took 0.057196 seconds and 6 git commands to generate.