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
81 !WARNING: Variable 'a' with SHARED locality implicitly declared
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
114 !BECAUSE: 'bad1' is not a variable
116 !ERROR: 'bad2' may not appear in a locality-spec because it is not definable
117 !BECAUSE: 'bad2' is not a variable
119 !ERROR: 'bad3' may not appear in a locality-spec because it is not definable
120 !BECAUSE: 'bad3' is not a variable
122 !ERROR: 'cos' may not appear in a locality-spec because it is not definable
123 !BECAUSE: 'cos' is not a variable
126 do concurrent(i
=1:2) &
127 !ERROR: The name 'bad1' must be a variable to appear in a locality-spec
129 !ERROR: The name 'bad2' must be a variable to appear in a locality-spec
131 !ERROR: The name 'bad3' must be a variable to appear in a locality-spec
133 !ERROR: The name 'cos' must be a variable to appear in a locality-spec