llvm-project
llvm-project copied to clipboard
[Flang] Respect (not converting) the Type and Kind of the actual argument when the corresponding dummy argument has IGNORE_TKR(TK)
Consider the following code:
interface
integer(4) function foo4(arg1, arg2)
integer :: arg1
integer(4) :: arg2
!dir$ ignore_tkr(k) arg1
end
end interface
integer(4) :: res, a
integer(2) :: b
res = foo4(b, a)
end
Flang currently converts arg1 from i16 to i32 when lowering.
%3 = fir.convert %1 : (!fir.ref<i16>) -> !fir.ref<i32>
This issue is to remove the conversion.
@llvm/issue-subscribers-flang-ir
https://reviews.llvm.org/D151401
@llvm/issue-subscribers-flang-frontend
The patch is landed.