llvm-project icon indicating copy to clipboard operation
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)

Open DanielCChen opened this issue 3 years ago • 4 comments

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.

DanielCChen avatar May 19 '23 17:05 DanielCChen

@llvm/issue-subscribers-flang-ir

llvmbot avatar May 19 '23 17:05 llvmbot

https://reviews.llvm.org/D151401

DanielCChen avatar May 25 '23 03:05 DanielCChen

@llvm/issue-subscribers-flang-frontend

llvmbot avatar May 25 '23 03:05 llvmbot

The patch is landed.

DanielCChen avatar May 26 '23 02:05 DanielCChen