1 ! RUN: %python %S/test_errors.py %s %flang_fc1
3 ! A variable-name that appears in a LOCAL or LOCAL_INIT locality-spec shall not
4 ! have the ALLOCATABLE; INTENT (IN); or OPTIONAL attribute; shall not be of
5 ! finalizable type; shall not be a nonpointer polymorphic dummy argument; and
6 ! shall not be a coarray or an assumed-size array.
9 ! Cannot have ALLOCATABLE variable in a locality spec
10 integer, allocatable
:: k
11 !ERROR: ALLOCATABLE variable 'k' not allowed in a locality-spec
12 do concurrent(i
=1:5) local(k
)
17 ! Cannot have a dummy OPTIONAL in a locality spec
18 integer, optional
:: arg
19 !ERROR: OPTIONAL argument 'arg' not allowed in a locality-spec
20 do concurrent(i
=1:5) local(arg
)
27 do concurrent(i
=1:5) local(arg
)
32 ! Cannot have a dummy INTENT(IN) in a locality spec
33 real, intent(in
) :: arg
34 !ERROR: INTENT IN argument 'arg' not allowed in a locality-spec
35 do concurrent(i
=1:5) local(arg
)
40 ! Cannot have a variable of a finalizable type in a locality spec
49 !ERROR: Finalizable variable 'var' not allowed in a locality-spec
50 do concurrent(i
=1:5) local(var
)
59 ! Cannot have a nonpointer polymorphic dummy argument in a locality spec
65 class(t
), pointer :: x
69 do concurrent(i
=1:5) local(x
)
73 !ERROR: Nonpointer polymorphic argument 'y' not allowed in a locality-spec
74 do concurrent(i
=1:5) local(y
)
80 ! Cannot have a coarray
81 integer, codimension
[*] :: coarray_var
82 !ERROR: Coarray 'coarray_var' not allowed in a locality-spec
83 do concurrent(i
=1:5) local(coarray_var
)
88 ! Cannot have an assumed size array
89 integer, dimension(*) :: arg
90 !ERROR: Assumed size array 'arg' not allowed in a locality-spec
91 do concurrent(i
=1:5) local(arg
)