diff options
author | Julian Brown <julian@codesourcery.com> | 2020-01-03 17:45:24 -0800 |
---|---|---|
committer | Julian Brown <julian@codesourcery.com> | 2020-01-28 06:00:29 -0800 |
commit | 99b9f5b4067a8c5c5a706694b9a23516126984de (patch) | |
tree | 5d190ae6b698c3f433d8bf206b66bbf7ce3c590d /gcc | |
parent | 72a9fd209b6db3b5f81fbb008e22ea93c00465e5 (diff) | |
download | gcc-99b9f5b4067a8c5c5a706694b9a23516126984de.zip gcc-99b9f5b4067a8c5c5a706694b9a23516126984de.tar.gz gcc-99b9f5b4067a8c5c5a706694b9a23516126984de.tar.bz2 |
Add OpenACC test for sub-references being pointer or allocatable variables
gcc/testsuite/
* gfortran.dg/goacc/strided-alloc-ptr.f90: New test.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gfortran.dg/goacc/strided-alloc-ptr.f90 | 34 |
2 files changed, 39 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index dfb7a0f..1b9436f 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2020-01-28 Tobias Burnus <tobias@codesourcery.com> + Julian Brown <julian@codesourcery.com> + + * gfortran.dg/goacc/strided-alloc-ptr.f90: New test. + 2020-01-28 Richard Biener <rguenther@suse.de> PR tree-optimization/93439 diff --git a/gcc/testsuite/gfortran.dg/goacc/strided-alloc-ptr.f90 b/gcc/testsuite/gfortran.dg/goacc/strided-alloc-ptr.f90 new file mode 100644 index 0000000..755fd1c --- /dev/null +++ b/gcc/testsuite/gfortran.dg/goacc/strided-alloc-ptr.f90 @@ -0,0 +1,34 @@ +implicit none +type t + integer, allocatable :: i, j(:) + integer, pointer :: k, ll(:) +end type t +type(t) :: x(2) + +!$acc enter data copyin(x) + +!$acc enter data copyin(x(:)%i) +! { dg-error "Component to the right of a part reference with nonzero rank must not have the ALLOCATABLE attribute" "" { target "*-*-*" } 10 } +! { dg-error ".x. in MAP clause at .1. is not a proper array section" "" { target "*-*-*" } 10 } + +!$acc enter data copyin(x(:)%j(3)) +! { dg-error "Component to the right of a part reference with nonzero rank must not have the ALLOCATABLE attribute" "" { target "*-*-*" } 14 } +! { dg-error ".x. in MAP clause at .1. is not a proper array section" "" { target "*-*-*" } 14 } + +!$acc enter data copyin(x(:)%j) +! { dg-error "Component to the right of a part reference with nonzero rank must not have the ALLOCATABLE attribute" "" { target "*-*-*" } 18 } +! { dg-error ".x. in MAP clause at .1. is not a proper array section" "" { target "*-*-*" } 18 } + + +!$acc enter data copyin(x(:)%k) +! { dg-error "Component to the right of a part reference with nonzero rank must not have the POINTER attribute" "" { target "*-*-*" } 23 } +! { dg-error ".x. in MAP clause at .1. is not a proper array section" "" { target "*-*-*" } 23 } + +!$acc enter data copyin(x(:)%ll(3)) +! { dg-error "Component to the right of a part reference with nonzero rank must not have the POINTER attribute" "" { target "*-*-*" } 27 } +! { dg-error ".x. in MAP clause at .1. is not a proper array section" "" { target "*-*-*" } 27 } + +!$acc enter data copyin(x(:)%ll) +! { dg-error "Component to the right of a part reference with nonzero rank must not have the POINTER attribute" "" { target "*-*-*" } 31 } +! { dg-error ".x. in MAP clause at .1. is not a proper array section" "" { target "*-*-*" } 31 } +end |