[LoopReroll] Add an extra defensive check to avoid SCEV assertion.
[llvm-project.git] / flang / test / Semantics / resolve30.f90
blobecf488a7d1fb3e865d2c575d2072638834650f26
1 ! RUN: %S/test_errors.sh %s %t %flang_fc1
2 ! REQUIRES: shell
3 subroutine s1
4 integer x
5 block
6 import, none
7 !ERROR: 'x' from host scoping unit is not accessible due to IMPORT
8 x = 1
9 end block
10 end
12 subroutine s2
13 block
14 import, none
15 !ERROR: 'y' from host scoping unit is not accessible due to IMPORT
16 y = 1
17 end block
18 end
20 subroutine s3
21 implicit none
22 integer :: i, j
23 block
24 import, none
25 !ERROR: No explicit type declared for 'i'
26 real :: a(16) = [(i, i=1, 16)]
27 real :: b(16)
28 !ERROR: No explicit type declared for 'j'
29 data(b(j), j=1, 16) / 16 * 0.0 /
30 end block
31 end
33 subroutine s4
34 real :: i, j
35 !ERROR: Must have INTEGER type, but is REAL(4)
36 real :: a(16) = [(i, i=1, 16)]
37 real :: b(16)
38 !ERROR: Must have INTEGER type, but is REAL(4)
39 data(b(j), j=1, 16) / 16 * 0.0 /
40 end