[flang][cuda] Do not apply implicit data attribute on dummy arg with VALUE (#119927)
Dummy arguments with the VALUE attribute do not need the implicit data attribute.
This commit is contained in:
committed by
GitHub
parent
537e0e1ff6
commit
1345ee4232
@@ -8976,7 +8976,7 @@ void ResolveNamesVisitor::FinishSpecificationPart(
|
||||
if (inDeviceSubprogram && IsDummy(symbol) &&
|
||||
symbol.has<ObjectEntityDetails>()) {
|
||||
auto *dummy{symbol.detailsIf<ObjectEntityDetails>()};
|
||||
if (!dummy->cudaDataAttr()) {
|
||||
if (!dummy->cudaDataAttr() && !IsValue(symbol)) {
|
||||
// Implicitly set device attribute if none is set in device context.
|
||||
dummy->set_cudaDataAttr(common::CUDADataAttr::Device);
|
||||
}
|
||||
|
||||
@@ -33,7 +33,6 @@ end
|
||||
!contains
|
||||
!attributes(global) subroutine globsub(x,y,z)
|
||||
!real(4),value::x
|
||||
!attributes(device) x
|
||||
!real(4)::y
|
||||
!attributes(device) y
|
||||
!real(4)::z
|
||||
|
||||
Reference in New Issue
Block a user