Break circular dependency between FIR dialect and utilities
[llvm-project.git] / flang / test / Semantics / resolve04.f90
blob890a9016340d9f713862e2cee29d99f2970240d6
1 ! RUN: %python %S/test_errors.py %s %flang_fc1
2 !ERROR: No explicit type declared for 'f'
3 function f()
4 implicit none
5 end
7 !ERROR: No explicit type declared for 'y'
8 subroutine s(x, y)
9 implicit none
10 integer :: x
11 end
13 subroutine s2
14 implicit none
15 block
16 !ERROR: No explicit type declared for 'i'
17 i = 1
18 end block
19 contains
20 subroutine s3
21 !ERROR: No explicit type declared for 'j'
22 j = 2
23 end subroutine
24 end subroutine
26 module m1
27 implicit none
28 contains
29 subroutine s1
30 implicit real (a-h)
31 a1 = 1.
32 h1 = 1.
33 !ERROR: No explicit type declared for 'i1'
34 i1 = 1
35 !ERROR: No explicit type declared for 'z1'
36 z1 = 2.
37 contains
38 subroutine ss1
39 implicit integer(f-j) ! overlap with host scope import is OK
40 a2 = 1.
41 h2 = 1
42 i2 = 1
43 !ERROR: No explicit type declared for 'z2'
44 z2 = 2.
45 contains
46 !ERROR: An internal subprogram may not contain an internal subprogram
47 subroutine sss1
48 implicit none
49 !ERROR: No explicit type declared for 'a3'
50 a3 = 1.
51 end subroutine
52 end subroutine
53 end subroutine
54 subroutine s2
55 !ERROR: No explicit type declared for 'b1'
56 b1 = 1.
57 end subroutine
58 end module