Remove check for Android in Mips.cpp (#123793)
[llvm-project.git] / flang / test / Semantics / resolve118.f90
blob024b67b5a471b20fb6c925d9949a420279f40809
1 ! RUN: %python %S/test_errors.py %s %flang_fc1 -pedantic
2 ! USE vs IMPORT
3 module m1
4 type t
5 integer n
6 end type
7 end module
9 module m2
10 type t
11 real x
12 end type
13 end module
15 module m3
16 use m1
17 interface
18 subroutine s1(x)
19 use m1
20 !PORTABILITY: The same 't' is already present in this scope
21 import t
22 type(t) x
23 end
24 subroutine s2(x)
25 use m2
26 !ERROR: A distinct 't' is already present in this scope
27 import t
28 type(t) x
29 end
30 end interface
31 end module
33 module m4
34 type t
35 complex z
36 end type
37 interface
38 subroutine s3(x)
39 use m1
40 !ERROR: A distinct 't' is already present in this scope
41 import t
42 type(t) x
43 end
44 end interface
45 end module
47 module m5
48 interface
49 subroutine s4(x)
50 use m1
51 !ERROR: A distinct 't' is already present in this scope
52 import t
53 type(t) x
54 end
55 end interface
56 contains
57 subroutine t
58 end
59 end module
61 module m6a
62 integer :: i = 7
63 end module
65 module m6b
66 interface
67 module subroutine sub(arg)
68 interface
69 integer function arg(x)
70 use m6a, only: i
71 real :: x(i) ! ok
72 end
73 end interface
74 end
75 end interface
76 end module
78 submodule (m6b) m6bs1
79 contains
80 module procedure sub
81 end
82 end submodule