This patch series fixes support for mixing arbitrary derived type
accesses and array element accesses in OpenACC directives, and fixes a
bug in derived-type lowering.

Somewhat relatedly, it also allows strided accesses in update directives.

Further commentary alongside each patch. Some of the test cases were
originally written by Tobias Burnus.

Tested with offloading to AMD GCN. OK for mainline (or for stage1)?

Thanks,

Julian

Julian Brown (4):
  openacc: Remove dereference for non-pointer derived-type members
  openacc: Use class_pointer instead of pointer attribute for class
    types
  openacc: Fix lowering for derived-type mappings through array elements
  openacc: Allow strided arrays in update directives

 gcc/fortran/openmp.c                          |   5 +-
 gcc/fortran/trans-openmp.c                    | 196 +++++++++++-------
 gcc/gimplify.c                                |  12 ++
 .../gfortran.dg/goacc/array-with-dt-1.f90     |  11 +
 .../gfortran.dg/goacc/array-with-dt-2.f90     |  10 +
 .../gfortran.dg/goacc/array-with-dt-3.f90     |  14 ++
 .../gfortran.dg/goacc/array-with-dt-4.f90     |  18 ++
 .../gfortran.dg/goacc/array-with-dt-5.f90     |  12 ++
 .../goacc/derived-classtypes-1.f90            | 129 ++++++++++++
 .../derivedtypes-arrays-1.f90                 | 109 ++++++++++
 .../libgomp.oacc-fortran/update-dt-array.f90  |  53 +++++
 11 files changed, 487 insertions(+), 82 deletions(-)
 create mode 100644 gcc/testsuite/gfortran.dg/goacc/array-with-dt-1.f90
 create mode 100644 gcc/testsuite/gfortran.dg/goacc/array-with-dt-2.f90
 create mode 100644 gcc/testsuite/gfortran.dg/goacc/array-with-dt-3.f90
 create mode 100644 gcc/testsuite/gfortran.dg/goacc/array-with-dt-4.f90
 create mode 100644 gcc/testsuite/gfortran.dg/goacc/array-with-dt-5.f90
 create mode 100644 gcc/testsuite/gfortran.dg/goacc/derived-classtypes-1.f90
 create mode 100644 
libgomp/testsuite/libgomp.oacc-fortran/derivedtypes-arrays-1.f90
 create mode 100644 libgomp/testsuite/libgomp.oacc-fortran/update-dt-array.f90

-- 
2.29.2

Reply via email to