diff options
author | Julian Brown <julian@codesourcery.com> | 2021-02-10 11:18:13 -0800 |
---|---|---|
committer | Julian Brown <julian@codesourcery.com> | 2021-02-17 06:13:55 -0800 |
commit | 366cf1127a547ff77024a551abb01bb1a6e963cd (patch) | |
tree | 9d80ccbf6dbb87d6a9b843f9401c5ac593b96216 /libgomp | |
parent | d28f3da11d8c0aed9b746689d723022a9b5ec04c (diff) | |
download | gcc-366cf1127a547ff77024a551abb01bb1a6e963cd.zip gcc-366cf1127a547ff77024a551abb01bb1a6e963cd.tar.gz gcc-366cf1127a547ff77024a551abb01bb1a6e963cd.tar.bz2 |
openacc: Strided array sections and components of derived-type arrays
This patch disallows selecting components of array sections in update
directives for OpenACC, as specified in OpenACC 3.0, "2.14.4. Update
Directive":
In Fortran, members of variables of derived type may appear, including
a subarray of a member. Members of subarrays of derived type may
not appear.
The diagnostic for attempting to use the same construct on other
directives has also been improved.
gcc/fortran/
* openmp.c (resolve_omp_clauses): Disallow selecting components
of arrays of derived type.
gcc/testsuite/
* gfortran.dg/goacc/array-with-dt-2.f90: Remove expected errors.
* gfortran.dg/goacc/array-with-dt-6.f90: New test.
* gfortran.dg/goacc/mapping-tests-2.f90: Update expected error.
* gfortran.dg/goacc/ref_inquiry.f90: Update expected errors.
* gfortran.dg/gomp/ref_inquiry.f90: Likewise.
libgomp/
* testsuite/libgomp.oacc-fortran/array-stride-dt-1.f90: Remove
expected errors.
Diffstat (limited to 'libgomp')
-rw-r--r-- | libgomp/testsuite/libgomp.oacc-fortran/array-stride-dt-1.f90 | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/libgomp/testsuite/libgomp.oacc-fortran/array-stride-dt-1.f90 b/libgomp/testsuite/libgomp.oacc-fortran/array-stride-dt-1.f90 index 6125070..f04d76d 100644 --- a/libgomp/testsuite/libgomp.oacc-fortran/array-stride-dt-1.f90 +++ b/libgomp/testsuite/libgomp.oacc-fortran/array-stride-dt-1.f90 @@ -24,9 +24,8 @@ end do b(1)%A(:,:) = 5 -! TODO: Remove expected errors once this is supported. -!$acc update device(b(::2)) ! { dg-error "Stride should not be specified for array section in MAP clause" } -!$acc update device(b(1)%A(::3,::4)) ! { dg-error "Stride should not be specified for array section in MAP clause" } +!$acc update device(b(::2)) +!$acc update device(b(1)%A(::3,::4)) do i=1,20 !$acc exit data copyout(b(i)%A) |