1 ! RUN: %python %S/test_errors.py %s %flang_fc1
6 !ERROR: 'foo' is already declared in this scoping unit
15 !ERROR: 'foo' is already declared in this scoping unit
21 real :: a(10,10), b(10,10)
24 !ERROR: Index name 'y' conflicts with existing identifier
25 forall(x
=1:10, y
=1:10)
28 !ERROR: Index name 'y' conflicts with existing identifier
29 forall(x
=1:10, y
=1:10) a(x
, y
) = b(x
, y
)
36 !ERROR: Must have INTEGER type, but is COMPLEX(4)
38 !ERROR: Must have INTEGER type, but is COMPLEX(4)
39 !ERROR: Must have INTEGER type, but is COMPLEX(4)
42 !ERROR: Must have INTEGER type, but is REAL(4)
44 !ERROR: Must have INTEGER type, but is REAL(4)
45 !ERROR: Must have INTEGER type, but is REAL(4)
48 !ERROR: Index variable 'i' is not scalar
55 integer, parameter :: n
= 4
56 real, dimension(n
) :: x
57 data(x(i
), i
=1, n
) / n
* 0.0 /
58 !ERROR: Index name 't' conflicts with existing identifier
59 forall(t
=1:n
) x(t
) = 0.0
66 integer, parameter :: k
= 4
68 forall(integer(k
) :: i
= 1:10)
70 ! C713 A scalar-int-constant-name shall be a named constant of type integer.
71 !ERROR: Must be a constant value
72 forall(integer(l
) :: i
= 1:10)
77 !ERROR: 'i' is already declared in this scoping unit
78 do concurrent(integer::i
=1:5) local(j
, i
) &
79 !ERROR: 'j' is already declared in this scoping unit
88 !ERROR: No explicit type declared for 'i'
89 do concurrent(i
=1:5) &
90 !ERROR: No explicit type declared for 'j'
92 !ERROR: No explicit type declared for 'k'
99 !ERROR: 'i' is already declared in this scoping unit
100 do concurrent(integer::i
=1:5) shared(i
) &
102 !ERROR: 'j' is already declared in this scoping unit
109 real, parameter :: bad2
= 1.0
111 do concurrent(i
=1:2) &
112 !ERROR: 'bad1' may not appear in a locality-spec because it is not definable
114 !ERROR: 'bad2' may not appear in a locality-spec because it is not definable
116 !ERROR: 'bad3' may not appear in a locality-spec because it is not definable
118 !ERROR: 'cos' may not appear in a locality-spec because it is not definable
121 do concurrent(i
=1:2) &
122 !ERROR: The name 'bad1' must be a variable to appear in a locality-spec
124 !ERROR: The name 'bad2' must be a variable to appear in a locality-spec
126 !ERROR: The name 'bad3' must be a variable to appear in a locality-spec
128 !ERROR: The name 'cos' must be a variable to appear in a locality-spec