[flang-commits] [flang] [flang][OpenMP] Don't allow DO CONCURRENT inside of a loop nest (PR #144506)
Tom Eccles via flang-commits
flang-commits at lists.llvm.org
Tue Jun 17 08:29:23 PDT 2025
================
@@ -1952,6 +1952,12 @@ void OmpAttributeVisitor::PrivatizeAssociatedLoopIndexAndCheckLoopLevel(
const auto &outer{std::get<std::optional<parser::DoConstruct>>(x.t)};
if (outer.has_value()) {
for (const parser::DoConstruct *loop{&*outer}; loop && level > 0; --level) {
+ if (loop->IsDoConcurrent()) {
+ auto &stmt =
+ std::get<parser::Statement<parser::NonLabelDoStmt>>(loop->t);
+ context_.Say(stmt.source,
+ "DO CONCURRENT loops cannot form part of a loop nest."_err_en_US);
+ }
----------------
tblah wrote:
ab3fba8 allows do concurrent as a single loop construct but not as part of a loop nest. Does that match your understanding of the standard?
https://github.com/llvm/llvm-project/pull/144506
More information about the flang-commits
mailing list