Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 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
5 changes: 5 additions & 0 deletions flang/lib/Semantics/check-call.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1033,6 +1033,11 @@ static void CheckExplicitDataArg(const characteristics::DummyDataObject &dummy,
*actualDataAttr == common::CUDADataAttr::Managed)) {
actualDataAttr = common::CUDADataAttr::Device;
}
if (!actualDataAttr &&
(*procedure.cudaSubprogramAttrs ==
common::CUDASubprogramAttrs::Device)) {
actualDataAttr = common::CUDADataAttr::Device;
}
}
if (dummyDataAttr == common::CUDADataAttr::Device &&
(dummyIsAssumedShape || dummyIsAssumedRank) &&
Expand Down
11 changes: 7 additions & 4 deletions flang/test/Semantics/cuf21.cuf
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,22 @@ module mlocModule
end interface maxlocUpdate
contains

attributes(global) subroutine maxlocPartialMaskR_32F1D()
attributes(global) subroutine maxlocPartialMaskR_32F1D(back)
implicit none
logical, intent(in), value :: back
real(4) :: mval

call maxlocUpdate(mval)
call maxlocUpdate(mval, back)

end subroutine maxlocPartialMaskR_32F1D

attributes(device) subroutine maxlocUpdateR_32F(mval)
attributes(device) subroutine maxlocUpdateR_32F(mval, back)
real(4) :: mval
logical :: back
end subroutine maxlocUpdateR_32F

attributes(device) subroutine maxlocUpdateR_64F(mval)
attributes(device) subroutine maxlocUpdateR_64F(mval, back)
real(8) :: mval
logical :: back
end subroutine maxlocUpdateR_64F
end module
Loading