OpenMP: Support 'lastprivate (conditional:' in Fortran
authorTobias Burnus <tobias@codesourcery.com>
Thu, 23 Jul 2020 15:36:41 +0000 (17:36 +0200)
committerTobias Burnus <tobias@codesourcery.com>
Thu, 23 Jul 2020 15:37:35 +0000 (17:37 +0200)
commit084dc63a0200e60e0fbb7c36b412a158d234f5c0
tree1784a06569c8d7ca9735980ef56f4d233ec25cb1
parentad1bea3a4b30482686be9245af78f994722f2fec
OpenMP: Support 'lastprivate (conditional:' in Fortran

gcc/fortran/ChangeLog:

* gfortran.h (gfc_omp_namelist): Add lastprivate_conditional.
* openmp.c (gfc_match_omp_clauses): Handle 'conditional:'
modifier of 'lastprivate'.
* trans-openmp.c (gfc_omp_clause_default_ctor): Don't assert
on OMP_CLAUSE__CONDTEMP_ and other OMP_*TEMP_.
(gfc_trans_omp_variable_list): Handle lastprivate_conditional.

gcc/testsuite/ChangeLog:

* gfortran.dg/gomp/lastprivate-conditional-1.f90: New test.
* gfortran.dg/gomp/lastprivate-conditional-2.f90: New test.
* gfortran.dg/gomp/lastprivate-conditional-3.f90: New test.
* gfortran.dg/gomp/lastprivate-conditional-4.f90: New test.
* gfortran.dg/gomp/lastprivate-conditional-5.f90: New test.
gcc/fortran/gfortran.h
gcc/fortran/openmp.c
gcc/fortran/trans-openmp.c
gcc/testsuite/gfortran.dg/gomp/lastprivate-conditional-1.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/gomp/lastprivate-conditional-2.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/gomp/lastprivate-conditional-3.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/gomp/lastprivate-conditional-4.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/gomp/lastprivate-conditional-5.f90 [new file with mode: 0644]