[Fortran] OpenACC – permit common blocks in some clauses

Programming / Compilers / GCC - burnus [138bc75d-0d04-0410-961f-82ee72b054a4] - 25 October 2019 14:28 EDT

2019-10-25 Cesar Philippidis Tobias Burnus

gcc/fortran/
- openmp.c (gfc_match_omp_map_clause): Add and pass allow_commons argument. (gfc_match_omp_clauses): Update calls to permit common blocks for OpenACC's copy/copyin/copyout, create/delete, host, pcopy/pcopy_in/pcopy_out, present_or_copy, present_or_copy_in, present_or_copy_out, present_or_create and self.

gcc/
- gimplify.c (oacc_default_clause): Privatize fortran common blocks. (omp_notice_variable): Defer the expansion of DECL_VALUE_EXPR for common block decls.

gcc/testsuite/
- gfortran.dg/goacc/common-block-1.f90: New test.
- gfortran.dg/goacc/common-block-2.f90: New test.
- gfortran.dg/goacc/common-block-3.f90: New test.

libgomp/
- testsuite/libgomp.oacc-fortran/common-block-1.f90: New test.
- testsuite/libgomp.oacc-fortran/common-block-2.f90: New test.
- testsuite/libgomp.oacc-fortran/common-block-3.f90: New test.

96d1e6235a5 [Fortran] OpenACC – permit common blocks in some clauses
gcc/ChangeLog | 7 +
gcc/fortran/ChangeLog | 10 ++
gcc/fortran/openmp.c | 41 +++---
gcc/gimplify.c | 51 +++++--
gcc/testsuite/ChangeLog | 7 +
gcc/testsuite/gfortran.dg/goacc/common-block-1.f90 | 74 ++++++++++
gcc/testsuite/gfortran.dg/goacc/common-block-2.f90 | 53 +++++++
gcc/testsuite/gfortran.dg/goacc/common-block-3.f90 | 39 ++++++
libgomp/ChangeLog | 7 +
.../libgomp.oacc-fortran/common-block-1.f90 | 107 +++++++++++++++
.../libgomp.oacc-fortran/common-block-2.f90 | 152 +++++++++++++++++++++
.../libgomp.oacc-fortran/common-block-3.f90 | 139 +++++++++++++++++++
12 files changed, 659 insertions(+), 28 deletions(-)

Upstream: gcc.gnu.org


  • Share