1! RUN: %B/test/Semantics/test_errors.sh %s %flang %t
2subroutine s1
3  integer x
4  block
5    import, none
6    !ERROR: 'x' from host scoping unit is not accessible due to IMPORT
7    x = 1
8  end block
9end
10
11subroutine s2
12  block
13    import, none
14    !ERROR: 'y' from host scoping unit is not accessible due to IMPORT
15    y = 1
16  end block
17end
18
19subroutine s3
20  implicit none
21  integer :: i, j
22  block
23    import, none
24    !ERROR: No explicit type declared for 'i'
25    real :: a(16) = [(i, i=1, 16)]
26    !ERROR: No explicit type declared for 'j'
27    data(a(j), j=1, 16) / 16 * 0.0 /
28  end block
29end
30
31subroutine s4
32  real :: i, j
33  !ERROR: Must have INTEGER type, but is REAL(4)
34  real :: a(16) = [(i, i=1, 16)]
35  data(
36    !ERROR: Must have INTEGER type, but is REAL(4)
37    a(j), &
38    !ERROR: Must have INTEGER type, but is REAL(4)
39    j=1, 16 &
40  ) / 16 * 0.0 /
41end
42