1 ! RUN: not %flang -fsyntax-only 2>&1 %s | FileCheck %s
12 character(5) function explicitLength(x
)
13 character(5), intent(in
) :: x
16 character(6) function badExplicitLength(x
)
17 character(5), intent(in
) :: x
20 real function notChar(x
)
21 character(*), intent(in
) :: x
26 character(*) function assumedLength(x
)
27 character(*), intent(in
) :: x
38 external assumedlength
39 character(5) :: assumedlength
40 call subr1(explicitLength
)
41 !CHECK: error: Actual argument function associated with procedure dummy argument 'f=' is not compatible: function results have distinct types: CHARACTER(KIND=1,LEN=5_8) vs CHARACTER(KIND=1,LEN=6_8)
42 call subr1(badExplicitLength
)
43 call subr1(assumedLength
)
44 !CHECK: error: Actual argument function associated with procedure dummy argument 'f=' is not compatible: function results have distinct types: CHARACTER(KIND=1,LEN=5_8) vs REAL(4)
46 call subr2(explicitLength
)
47 call subr2(assumedLength
)
48 !CHECK: error: Actual argument function associated with procedure dummy argument 'f=' is not compatible: function results have distinct types: CHARACTER(KIND=1,LEN=*) vs REAL(4)
50 call subr3(explicitLength
)
51 !CHECK: warning: If the procedure's interface were explicit, this reference would be in error
52 !CHECK: because: Actual argument function associated with procedure dummy argument 'f=' is not compatible: function results have distinct types: CHARACTER(KIND=1,LEN=5_8) vs CHARACTER(KIND=1,LEN=6_8)
53 call subr3(badExplicitLength
)
54 call subr3(assumedLength
)
55 !CHECK: warning: If the procedure's interface were explicit, this reference would be in error
56 !CHECK: because: Actual argument function associated with procedure dummy argument 'f=' is not compatible: function results have distinct types: CHARACTER(KIND=1,LEN=5_8) vs REAL(4)