aboutsummaryrefslogtreecommitdiff
path: root/flang/lib/Semantics/check-cuda.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'flang/lib/Semantics/check-cuda.cpp')
-rw-r--r--flang/lib/Semantics/check-cuda.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/flang/lib/Semantics/check-cuda.cpp b/flang/lib/Semantics/check-cuda.cpp
index b011476..9b48432 100644
--- a/flang/lib/Semantics/check-cuda.cpp
+++ b/flang/lib/Semantics/check-cuda.cpp
@@ -761,14 +761,13 @@ void CUDAChecker::Enter(const parser::AssignmentStmt &x) {
// legal.
if (nbLhs == 0 && nbRhs > 1) {
context_.Say(lhsLoc,
- "More than one reference to a CUDA object on the right hand side of the assigment"_err_en_US);
+ "More than one reference to a CUDA object on the right hand side of the assignment"_err_en_US);
}
- if (Fortran::evaluate::HasCUDADeviceAttrs(assign->lhs) &&
- Fortran::evaluate::HasCUDAImplicitTransfer(assign->rhs)) {
+ if (evaluate::HasCUDADeviceAttrs(assign->lhs) &&
+ evaluate::HasCUDAImplicitTransfer(assign->rhs)) {
if (GetNbOfCUDAManagedOrUnifiedSymbols(assign->lhs) == 1 &&
- GetNbOfCUDAManagedOrUnifiedSymbols(assign->rhs) == 1 &&
- GetNbOfCUDADeviceSymbols(assign->rhs) == 1) {
+ GetNbOfCUDAManagedOrUnifiedSymbols(assign->rhs) == 1 && nbRhs == 1) {
return; // This is a special case handled on the host.
}
context_.Say(lhsLoc, "Unsupported CUDA data transfer"_err_en_US);