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 PR is to remove the conversion.
I think you want to only be affected here by the first two parts of the typesCompatible conjunction, which depend on IgnoreTKR, but not the last one. So you'll have to split typesCompatible, with a new Boolean indicating whether IgnoreTKR was applied, and then use that new Boolean in your new &= !....