44! This is okay: selects the whole substring
55subroutine substring_0 (c )
66 character (:), pointer :: c
7+ ! PORTABILITY: The use of substrings in OpenMP argument lists has been disallowed since OpenMP 5.2.
78 ! $omp task depend(out:c(:))
89 ! $omp end task
910end
1011
1112! This is okay: selects from the second character onwards
1213subroutine substring_1 (c )
1314 character (:), pointer :: c
15+ ! PORTABILITY: The use of substrings in OpenMP argument lists has been disallowed since OpenMP 5.2.
1416 ! $omp task depend(out:c(2:))
1517 ! $omp end task
1618end
1719
1820! This is okay: selects the first 2 characters
1921subroutine substring_2 (c )
2022 character (:), pointer :: c
23+ ! PORTABILITY: The use of substrings in OpenMP argument lists has been disallowed since OpenMP 5.2.
2124 ! $omp task depend(out:c(:2))
2225 ! $omp end task
2326end
2427
2528! Error
2629subroutine substring_3 (c )
2730 character (:), pointer :: c
31+ ! PORTABILITY: The use of substrings in OpenMP argument lists has been disallowed since OpenMP 5.2.
2832 ! ERROR: Substrings must be in the form parent-string(lb:ub)
2933 ! $omp task depend(out:c(2))
3034 ! $omp end task
@@ -47,7 +51,8 @@ subroutine substring_4(c)
4751! This is not okay: substrings can't have a stride
4852subroutine substring_5 (c )
4953 character (:), pointer :: c
50- ! ERROR: Cannot specify a step for a substring
54+ ! PORTABILITY: The use of substrings in OpenMP argument lists has been disallowed since OpenMP 5.2.
55+ ! ERROR: Cannot specify a step for a substring
5156 ! $omp task depend(out:c(1:20:5))
5257 ! $omp end task
5358end
0 commit comments