[Fortran] OpenACC – permit common blocks in some clauses
authorCesar Philippidis <cesar@codesourcery.com>
Fri, 25 Oct 2019 14:28:40 +0000 (07:28 -0700)
committerTobias Burnus <burnus@gcc.gnu.org>
Fri, 25 Oct 2019 14:28:40 +0000 (16:28 +0200)
commitec0846134e08ed5f645db858385b385227ae5026
treecf234892de7408cd52df5184bcccdcae675e7bb4
parent643c11a1f7407d694031b12d86fd6fc0fd5e9d10
[Fortran] OpenACC – permit common blocks in some clauses

2019-10-25  Cesar Philippidis <cesar@codesourcery.com>
    Tobias Burnus  <tobias@codesourcery.com>

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.

Reviewed-by: Thomas Schwinge <thomas@codesourcery.com>
Co-Authored-By: Tobias Burnus <tobias@codesourcery.com>
From-SVN: r277451
12 files changed:
gcc/ChangeLog
gcc/fortran/ChangeLog
gcc/fortran/openmp.c
gcc/gimplify.c
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/goacc/common-block-1.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/goacc/common-block-2.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/goacc/common-block-3.f90 [new file with mode: 0644]
libgomp/ChangeLog
libgomp/testsuite/libgomp.oacc-fortran/common-block-1.f90 [new file with mode: 0644]
libgomp/testsuite/libgomp.oacc-fortran/common-block-2.f90 [new file with mode: 0644]
libgomp/testsuite/libgomp.oacc-fortran/common-block-3.f90 [new file with mode: 0644]