Debian Codegraph @

gcc/testsuite/gfortran.dg/goacc/substring.f90

raw
1 implicit none
2 character(len=10) :: str1, str2(5,5)
3
4 type t
5 character(len=10) :: str1, str2(5,5)
6 end type t
7 type(t) :: v
8
9 !$acc enter data copyin(v%str1) ! OK
10 !$acc enter data copyin(v%str2) ! OK
11 !$acc enter data copyin(v%str2(1,2)) ! OK
12 !$acc enter data copyin(str1) ! OK
13 !$acc enter data copyin(str2) ! OK
14 !$acc enter data copyin(str2(1,2)) ! OK
15
16 !$acc enter data copyin(v%str1(2:5)) ! { dg-error "Unexpected substring reference in MAP clause" }
17 !$acc enter data copyin(v%str2(1,2)(2:4)) ! { dg-error "Unexpected substring reference in MAP clause" }
18 !$acc enter data copyin(str1(2:5)) ! { dg-error "Unexpected substring reference in MAP clause" }
19 !$acc enter data copyin(str2(1,2)(2:4)) ! { dg-error "Unexpected substring reference in MAP clause" }
20
21 !$acc parallel
22 !$acc update host(v%str1(2:5)) ! { dg-error "Unexpected substring reference in MAP clause" }
23 !$acc update host(v%str2(1,2)(2:4)) ! { dg-error "Unexpected substring reference in MAP clause" }
24 !$acc update host(str1(2:5)) ! { dg-error "Unexpected substring reference in MAP clause" }
25 !$acc update host(str2(1,2)(2:4)) ! { dg-error "Unexpected substring reference in MAP clause" }
26 !$acc end parallel
27 end