Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions flang/lib/Support/Fortran.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
9 changes: 9 additions & 0 deletions flang/test/Semantics/cuf13.cuf
Original file line number Diff line number Diff line change
Expand Up @@ -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(:)
Expand Down Expand Up @@ -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
Loading