llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT--> @llvm/pr-subscribers-flang-openmp Author: None (llvmbot) <details> <summary>Changes</summary> Backport 53d9d46d762207b2117eac9b0799bdd21b4b6dba Requested by: @<!-- -->kparzysz --- Full diff: https://github.com/llvm/llvm-project/pull/176943.diff 2 Files Affected: - (modified) flang/lib/Semantics/check-omp-structure.cpp (-6) - (modified) flang/test/Semantics/OpenMP/use_device_addr1.f90 (+1-1) ``````````diff diff --git a/flang/lib/Semantics/check-omp-structure.cpp b/flang/lib/Semantics/check-omp-structure.cpp index 2acf0dee1f77e..7c7379d125f29 100644 --- a/flang/lib/Semantics/check-omp-structure.cpp +++ b/flang/lib/Semantics/check-omp-structure.cpp @@ -4848,7 +4848,6 @@ void OmpStructureChecker::Enter(const parser::OmpClause::UseDeviceAddr &x) { SymbolSourceMap currSymbols; GetSymbolsInObjectList(x.v, currSymbols); semantics::UnorderedSymbolSet listVars; - unsigned version{context_.langOptions().OpenMPVersion}; for (auto [_, clause] : FindClauses(llvm::omp::Clause::OMPC_use_device_addr)) { @@ -4862,11 +4861,6 @@ void OmpStructureChecker::Enter(const parser::OmpClause::UseDeviceAddr &x) { useDeviceAddrNameList.push_back(*name); } } - if (version < 60 && IsWholeAssumedSizeArray(ompObject)) { - auto maybeSource{GetObjectSource(ompObject)}; - context_.Say(maybeSource.value_or(clause->source), - "Whole assumed-size arrays are not allowed on USE_DEVICE_ADDR clause"_err_en_US); - } } CheckMultipleOccurrence( listVars, useDeviceAddrNameList, clause->source, "USE_DEVICE_ADDR"); diff --git a/flang/test/Semantics/OpenMP/use_device_addr1.f90 b/flang/test/Semantics/OpenMP/use_device_addr1.f90 index 696ab3cc57278..1b5e4a26dc248 100644 --- a/flang/test/Semantics/OpenMP/use_device_addr1.f90 +++ b/flang/test/Semantics/OpenMP/use_device_addr1.f90 @@ -31,7 +31,7 @@ subroutine omp_target_data(asa) b = a !$omp end target data - !ERROR: Whole assumed-size arrays are not allowed on USE_DEVICE_ADDR clause + !No diagnostic expected, assumed-size arrays are ok !$omp target data use_device_addr(asa) !$omp end target data end subroutine omp_target_data `````````` </details> https://github.com/llvm/llvm-project/pull/176943 _______________________________________________ llvm-branch-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
