We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 537e0e1 commit 1345ee4Copy full SHA for 1345ee4
flang/lib/Semantics/resolve-names.cpp
@@ -8976,7 +8976,7 @@ void ResolveNamesVisitor::FinishSpecificationPart(
8976
if (inDeviceSubprogram && IsDummy(symbol) &&
8977
symbol.has<ObjectEntityDetails>()) {
8978
auto *dummy{symbol.detailsIf<ObjectEntityDetails>()};
8979
- if (!dummy->cudaDataAttr()) {
+ if (!dummy->cudaDataAttr() && !IsValue(symbol)) {
8980
// Implicitly set device attribute if none is set in device context.
8981
dummy->set_cudaDataAttr(common::CUDADataAttr::Device);
8982
}
flang/test/Semantics/modfile55.cuf
@@ -33,7 +33,6 @@ end
33
!contains
34
!attributes(global) subroutine globsub(x,y,z)
35
!real(4),value::x
36
-!attributes(device) x
37
!real(4)::y
38
!attributes(device) y
39
!real(4)::z
0 commit comments