1 ! RUN: %S/test_errors.sh %s %t %flang_fc1
7 !ERROR: 'foo' is already declared in this scoping unit
16 !ERROR: 'foo' is already declared in this scoping unit
22 real :: a(10,10), b(10,10)
25 !ERROR: Index name 'y' conflicts with existing identifier
26 forall(x
=1:10, y
=1:10)
29 !ERROR: Index name 'y' conflicts with existing identifier
30 forall(x
=1:10, y
=1:10) a(x
, y
) = b(x
, y
)
37 !ERROR: Must have INTEGER type, but is COMPLEX(4)
39 !ERROR: Must have INTEGER type, but is COMPLEX(4)
40 !ERROR: Must have INTEGER type, but is COMPLEX(4)
43 !ERROR: Must have INTEGER type, but is REAL(4)
45 !ERROR: Must have INTEGER type, but is REAL(4)
46 !ERROR: Must have INTEGER type, but is REAL(4)
49 !ERROR: Index variable 'i' is not scalar
56 integer, parameter :: n
= 4
57 real, dimension(n
) :: x
58 data(x(i
), i
=1, n
) / n
* 0.0 /
59 !ERROR: Index name 't' conflicts with existing identifier
60 forall(t
=1:n
) x(t
) = 0.0
67 integer, parameter :: k
= 4
69 forall(integer(k
) :: i
= 1:10)
71 ! C713 A scalar-int-constant-name shall be a named constant of type integer.
72 !ERROR: Must be a constant value
73 forall(integer(l
) :: i
= 1:10)
78 !ERROR: 'i' is already declared in this scoping unit
79 do concurrent(integer::i
=1:5) local(j
, i
) &
80 !ERROR: 'j' is already declared in this scoping unit
89 !ERROR: No explicit type declared for 'i'
90 do concurrent(i
=1:5) &
91 !ERROR: No explicit type declared for 'j'
93 !ERROR: No explicit type declared for 'k'
100 !ERROR: 'i' is already declared in this scoping unit
101 do concurrent(integer::i
=1:5) shared(i
) &
103 !ERROR: 'j' is already declared in this scoping unit
110 real, parameter :: bad2
= 1.0
112 do concurrent(i
=1:2) &
113 !ERROR: 'bad1' may not appear in a locality-spec because it is not definable
115 !ERROR: 'bad2' may not appear in a locality-spec because it is not definable
117 !ERROR: 'bad3' may not appear in a locality-spec because it is not definable
119 !ERROR: 'cos' may not appear in a locality-spec because it is not definable
122 do concurrent(i
=1:2) &
123 !ERROR: The name 'bad1' must be a variable to appear in a locality-spec
125 !ERROR: The name 'bad2' must be a variable to appear in a locality-spec
127 !ERROR: The name 'bad3' must be a variable to appear in a locality-spec
129 !ERROR: The name 'cos' must be a variable to appear in a locality-spec