1 ! Test that actual logical arguments convert to the right kind when it is non-default
2 ! RUN: %flang_fc1 -fdebug-unparse %s 2>&1 | FileCheck %s
3 ! RUN: %flang_fc1 -fdebug-unparse -fdefault-integer-8 %s 2>&1 | FileCheck %s --check-prefixes CHECK-8
8 logical(kind
=4), intent(in
) :: l
11 logical(kind
=8), intent(in
) :: l
20 ! CHECK: CALL foo(.true._4)
21 ! CHECK-8: CALL foo(.true._8)
23 ! CHECK: CALL foo(.true._4)
24 ! CHECK-8: CALL foo(.true._8)
26 ! CHECK: CALL foo(x(1_8)>y)
27 ! CHECK-8: CALL foo(logical(x(1_8)>y,kind=8))
29 ! CHECK: CALL fooa(x>y)
30 ! CHECK-8: CALL fooa(logical(x>y,kind=8))
33 ! Ensure that calls to interfaces call the correct subroutine
34 ! CHECK: CALL foo4(.true._4)
35 ! CHECK-8: CALL foo8(.true._8)
37 ! CHECK: CALL foo4(.true._4)
38 ! CHECK-8: CALL foo8(.true._8)
40 ! CHECK: CALL foo4(x(1_8)>y)
41 ! CHECK-8: CALL foo8(logical(x(1_8)>y,kind=8))