openacc: Dereference BT_CLASS data pointers but not BT_DERIVED pointers
authorJulian Brown <julian@codesourcery.com>
Fri, 29 Jan 2021 23:37:27 +0000 (15:37 -0800)
committerJulian Brown <julian@codesourcery.com>
Thu, 4 Feb 2021 23:05:14 +0000 (15:05 -0800)
commitcff6e8db880b6e262730b1ce9a9cb00c1f5571e2
treedffe984f4fa49bc703fcdce0e4117f99402d5595
parent0b34dbc0a24864b1674bff7a92fa3cf0f1cbcea1
openacc: Dereference BT_CLASS data pointers but not BT_DERIVED pointers

The stanza in gfc_trans_omp_clauses that handles derived type members
that are themselves derived type pointers or class pointers now adds
an explicit dereference only for the latter. The former is already
dereferenced transparently in gfc_conv_component_ref.

gcc/fortran/
* trans-openmp.c (gfc_trans_omp_clauses): Fix dereferencing for
BT_DERIVED members.

gcc/testsuite/
* gfortran.dg/goacc/derived-classtypes-1.f95: New test.
gcc/fortran/trans-openmp.c
gcc/testsuite/gfortran.dg/goacc/derived-classtypes-1.f95 [new file with mode: 0644]