llvm-project/flang/test/Semantics/ignore_tkr02.f90
Kelvin Li f6e8b3ec8d [flang] Don't convert actual argument if IGNORE_TKR is present for the corresponding dummy
This patch is to remove the conversion of the actual argument that
is associated with the dummy argument specified with the IGNORE_TKR
directive.

Commit on behalf of @danielcchen

Differential Revision: https://reviews.llvm.org/D151401
2023-05-25 13:26:11 -04:00

39 lines
911 B
Fortran

! RUN: %flang_fc1 -fdebug-unparse %s 2>&1 | FileCheck %s
program main
interface generic
subroutine sub1(j, k)
integer(1) j
integer k
!dir$ ignore_tkr(kr) k
end
subroutine sub2(j, k)
integer(2) j
integer k
!dir$ ignore_tkr(kr) k
end
subroutine sub4(j, k)
integer(4) j
integer k
!dir$ ignore_tkr(kr) k
end
end interface
!CHECK: CALL sub1(1_1,1_1)
call generic(1_1,1_1)
!CHECK: CALL sub1(1_1,1_2)
call generic(1_1,1_2)
!CHECK: CALL sub1(1_1,[INTEGER(1)::1_1])
call generic(1_1,[1_1])
!CHECK: CALL sub2(1_2,1_1)
call generic(1_2,1_1)
!CHECK: CALL sub2(1_2,1_2)
call generic(1_2,1_2)
!CHECK: CALL sub2(1_2,[INTEGER(1)::1_1])
call generic(1_2,[1_1])
!CHECK: CALL sub4(1_4,1_1)
call generic(1_4,1_1)
!CHECK: CALL sub4(1_4,1_2)
call generic(1_4,1_2)
!CHECK: CALL sub4(1_4,[INTEGER(1)::1_1])
call generic(1_4,[1_1])
end