File tree Expand file tree Collapse file tree 2 files changed +21
-0
lines changed Expand file tree Collapse file tree 2 files changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -2285,6 +2285,21 @@ void OmpStructureChecker::Leave(const parser::OmpClauseList &) {
2285
2285
}
2286
2286
}
2287
2287
}
2288
+
2289
+ // 2.11.5 Simd construct restriction (OpenMP 5.1)
2290
+ if (auto *sl_clause{FindClause (llvm::omp::Clause::OMPC_safelen)}) {
2291
+ if (auto *o_clause{FindClause (llvm::omp::Clause::OMPC_order)}) {
2292
+ const auto &orderClause{
2293
+ std::get<parser::OmpClause::Order>(o_clause->u )};
2294
+ if (std::get<parser::OmpOrderClause::Type>(orderClause.v .t ) ==
2295
+ parser::OmpOrderClause::Type::Concurrent) {
2296
+ context_.Say (sl_clause->source ,
2297
+ " The `SAFELEN` clause cannot appear in the `SIMD` directive "
2298
+ " with `ORDER(CONCURRENT)` clause" _err_en_US);
2299
+ }
2300
+ }
2301
+ }
2302
+
2288
2303
// Sema checks related to presence of multiple list items within the same
2289
2304
// clause
2290
2305
CheckMultListItems ();
Original file line number Diff line number Diff line change 390
390
enddo
391
391
! $omp end parallel
392
392
393
+ ! ERROR: The `SAFELEN` clause cannot appear in the `SIMD` directive with `ORDER(CONCURRENT)` clause
394
+ ! $omp simd order(concurrent) safelen(1+2)
395
+ do i = 1 , N
396
+ a = 3.14
397
+ enddo
398
+
393
399
! 2.11.1 parallel-do-clause -> parallel-clause |
394
400
! do-clause
395
401
You can’t perform that action at this time.
0 commit comments