[flang-commits] [clang] [flang] [mlir] [Flang][OpenMP] Lower DECLARE TARGET INDIRECT clause (PR #208387)

via flang-commits flang-commits at lists.llvm.org
Mon Aug 10 14:02:11 PDT 2026


================
@@ -2662,7 +2647,7 @@ void OmpStructureChecker::Leave(const parser::OmpDeclareTargetDirective &x) {
       context_.Say(x.source,
           "If the DECLARE TARGET directive has a clause, it must contain at least one ENTER clause or LINK clause"_err_en_US);
     }
-    if (indirectClause && !enterClause) {
+    if (indirectClause && !enterClause && !toClause) {
       context_.Say(x.source,
           "The INDIRECT clause cannot be used without the ENTER clause with the DECLARE TARGET directive."_err_en_US);
----------------
chichunchen wrote:

This diagnostic is outdated now that to clause is also accepted.

https://github.com/llvm/llvm-project/pull/208387


More information about the flang-commits mailing list