[Flang][RISCV] Set vscale_range based off zvl*b (#77277)
[llvm-project.git] / flang / test / Semantics / resolve29.f90
blob3e6a8a0ba697638560c8352130bb524f11b4e866
1 ! RUN: %python %S/test_errors.py %s %flang_fc1
2 module m1
3 type t1
4 end type
5 type t3
6 end type
7 interface
8 subroutine s1(x)
9 !ERROR: 't1' from host is not accessible
10 import :: t1
11 type(t1) :: x
12 !BECAUSE: 't1' is hidden by this entity
13 integer :: t1
14 end subroutine
15 subroutine s2()
16 !ERROR: 't2' not found in host scope
17 import :: t2
18 end subroutine
19 subroutine s3(x, y)
20 !ERROR: Derived type 't1' not found
21 type(t1) :: x, y
22 end subroutine
23 subroutine s4(x, y)
24 !ERROR: 't3' from host is not accessible
25 import, all
26 type(t1) :: x
27 type(t3) :: y
28 !BECAUSE: 't3' is hidden by this entity
29 integer :: t3
30 end subroutine
31 end interface
32 contains
33 subroutine s5()
34 end
35 subroutine s6()
36 import, only: s5
37 implicit none(external)
38 call s5()
39 end
40 subroutine s7()
41 import, only: t1
42 implicit none(external)
43 !ERROR: 's5' is an external procedure without the EXTERNAL attribute in a scope with IMPLICIT NONE(EXTERNAL)
44 call s5()
45 end
46 subroutine s8()
47 !This case is a dangerous ambiguity allowed by the standard.
48 !ERROR: 't1' from host is not accessible
49 type(t1), pointer :: p
50 !BECAUSE: 't1' is hidden by this entity
51 type t1
52 integer n(2)
53 end type
54 end
55 subroutine s9()
56 !This case is a dangerous ambiguity allowed by the standard.
57 type t2
58 !ERROR: 't1' from host is not accessible
59 type(t1), pointer :: p
60 end type
61 !BECAUSE: 't1' is hidden by this entity
62 type t1
63 integer n(2)
64 end type
65 type(t2) x
66 end
67 end module
68 module m2
69 integer, parameter :: ck = kind('a')
70 end module
71 program main
72 use m2
73 interface
74 subroutine s0(x)
75 import :: ck
76 character(kind=ck) :: x ! no error
77 end subroutine
78 end interface
79 end program