diff options
author | Tobias Burnus <tobias@codesourcery.com> | 2020-08-04 14:42:26 +0200 |
---|---|---|
committer | Tobias Burnus <tobias@codesourcery.com> | 2020-08-04 14:42:26 +0200 |
commit | 7bd72dd5a385dfa6d49cfe640cefc9ed187361d3 (patch) | |
tree | 1139c4f27f43153f55ece7272f40694a1591624f /gcc/fortran/trans-openmp.c | |
parent | 7cda9e0878da44dcaf025d3d146534dfaf0b9986 (diff) | |
download | gcc-7bd72dd5a385dfa6d49cfe640cefc9ed187361d3.zip gcc-7bd72dd5a385dfa6d49cfe640cefc9ed187361d3.tar.gz gcc-7bd72dd5a385dfa6d49cfe640cefc9ed187361d3.tar.bz2 |
Fortran: Fix for OpenMP's 'lastprivate(conditional:'
gcc/fortran/ChangeLog:
* trans-openmp.c (gfc_trans_omp_do): Fix 'lastprivate(conditional:'.
gcc/testsuite/ChangeLog:
* gfortran.dg/gomp/lastprivate-conditional-3.f90: Enable some
previously disabled 'lastprivate(conditional:' dg-warnings.
Diffstat (limited to 'gcc/fortran/trans-openmp.c')
-rw-r--r-- | gcc/fortran/trans-openmp.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/fortran/trans-openmp.c b/gcc/fortran/trans-openmp.c index 98702b1..7891a7e 100644 --- a/gcc/fortran/trans-openmp.c +++ b/gcc/fortran/trans-openmp.c @@ -4570,6 +4570,8 @@ gfc_trans_omp_do (gfc_code *code, gfc_exec_op op, stmtblock_t *pblock, { tree l = build_omp_clause (input_location, OMP_CLAUSE_LASTPRIVATE); + if (OMP_CLAUSE_LASTPRIVATE_CONDITIONAL (c)) + OMP_CLAUSE_LASTPRIVATE_CONDITIONAL (l) = 1; OMP_CLAUSE_DECL (l) = dovar_decl; OMP_CLAUSE_CHAIN (l) = omp_clauses; OMP_CLAUSE_LASTPRIVATE_STMT (l) = tmp; |