[Flang][RISCV] Set vscale_range based off zvl*b (#77277)
[llvm-project.git] / flang / test / Semantics / call37.f90
blob6018b8697ad5fb180395c2e38b03527c62776f49
1 ! RUN: %python %S/test_errors.py %s %flang_fc1 -pedantic -Werror
2 ! Test warnings on mismatching interfaces involvingCHARACTER arguments
3 subroutine constLen(s)
4 character(len = 1) s
5 end
6 subroutine assumedLen(s)
7 character(len = *) s
8 end
9 subroutine exprLen(s)
10 common n
11 character(len = n) s
12 end
14 module m0
15 interface ! these are all OK
16 subroutine constLen(s)
17 character(len=1) s
18 end
19 subroutine assumedLen(s)
20 character(len=*) s
21 end
22 subroutine exprLen(s)
23 common n
24 character(len=n) s
25 end
26 end interface
27 end
29 module m1
30 interface
31 !WARNING: The global subprogram 'constlen' is not compatible with its local procedure declaration (incompatible dummy argument #1: incompatible dummy data object types: CHARACTER(KIND=1,LEN=1_8) vs CHARACTER(KIND=1,LEN=2_8))
32 subroutine constLen(s)
33 character(len=2) s
34 end
35 !WARNING: The global subprogram 'assumedlen' is not compatible with its local procedure declaration (incompatible dummy argument #1: assumed-length character vs explicit-length character)
36 subroutine assumedLen(s)
37 character(len=2) s
38 end
39 !WARNING: The global subprogram 'exprlen' is not compatible with its local procedure declaration (incompatible dummy argument #1: constant-length vs non-constant-length character dummy arguments)
40 subroutine exprLen(s)
41 character(len=2) s
42 end
43 end interface
44 end
46 module m2
47 interface
48 !WARNING: The global subprogram 'constlen' is not compatible with its local procedure declaration (incompatible dummy argument #1: assumed-length character vs explicit-length character)
49 subroutine constLen(s)
50 character(len=*) s
51 end
52 !WARNING: The global subprogram 'exprlen' is not compatible with its local procedure declaration (incompatible dummy argument #1: assumed-length character vs explicit-length character)
53 subroutine exprLen(s)
54 character(len=*) s
55 end
56 end interface
57 end
59 module m3
60 interface
61 !WARNING: The global subprogram 'constlen' is not compatible with its local procedure declaration (incompatible dummy argument #1: constant-length vs non-constant-length character dummy arguments)
62 subroutine constLen(s)
63 common n
64 character(len=n) s
65 end
66 !WARNING: The global subprogram 'assumedlen' is not compatible with its local procedure declaration (incompatible dummy argument #1: assumed-length character vs explicit-length character)
67 subroutine assumedLen(s)
68 common n
69 character(len=n) s
70 end
71 end interface
72 end