[flang][cuda] Check for ignore_tkr(d) when resolving generic call (#131923)
This commit is contained in:
committed by
GitHub
parent
98943c4bd8
commit
b7ed5c8e06
@@ -111,6 +111,9 @@ bool AreCompatibleCUDADataAttrs(std::optional<CUDADataAttr> x,
|
||||
bool isCudaUnified{features
|
||||
? features->IsEnabled(common::LanguageFeature::CudaUnified)
|
||||
: false};
|
||||
if (ignoreTKR.test(common::IgnoreTKR::Device)) {
|
||||
return true;
|
||||
}
|
||||
if (!x && !y) {
|
||||
return true;
|
||||
} else if (x && y && *x == *y) {
|
||||
|
||||
@@ -8,6 +8,13 @@ module matching
|
||||
module procedure sub_unified
|
||||
end interface
|
||||
|
||||
interface
|
||||
subroutine ignore(a)
|
||||
!dir$ ignore_tkr(d) a
|
||||
integer, managed :: a(:)
|
||||
end subroutine
|
||||
end interface
|
||||
|
||||
contains
|
||||
subroutine sub_host(a)
|
||||
integer :: a(:)
|
||||
@@ -43,9 +50,11 @@ program m
|
||||
call sub(u) ! Should resolve to sub_unified
|
||||
call sub(d) ! Should resolve to sub_device
|
||||
|
||||
call ignore(a)
|
||||
end
|
||||
|
||||
! CHECK: CALL sub_host
|
||||
! CHECK: CALL sub_managed
|
||||
! CHECK: CALL sub_unified
|
||||
! CHECK: CALL sub_device
|
||||
! CHECK: CALL ignore
|
||||
|
||||
Reference in New Issue
Block a user