Skip to content

Commit 023b9e0

Browse files
committed
add check of VALUE attribute for actual
1 parent 8ec0fe9 commit 023b9e0

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

flang/lib/Semantics/check-call.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1033,10 +1033,9 @@ static void CheckExplicitDataArg(const characteristics::DummyDataObject &dummy,
10331033
*actualDataAttr == common::CUDADataAttr::Managed)) {
10341034
actualDataAttr = common::CUDADataAttr::Device;
10351035
}
1036-
// For device procedures, treat non-VALUE arguments without explicit CUDA
1037-
// attributes as device data
1038-
if (!actualDataAttr &&
1039-
!dummy.attrs.test(characteristics::DummyDataObject::Attr::Value) &&
1036+
// For device procedures, treat actual arguments with VALUE attribute as
1037+
// device data
1038+
if (!actualDataAttr && actualLastSymbol && IsValue(*actualLastSymbol) &&
10401039
(*procedure.cudaSubprogramAttrs ==
10411040
common::CUDASubprogramAttrs::Device)) {
10421041
actualDataAttr = common::CUDADataAttr::Device;

0 commit comments

Comments
 (0)