[llvm-branch-commits] [flang] [flang][OpenMP] Switch clause verification to descriptor-based (PR #229527)

Sairudra More via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Mon Oct 19 02:31:03 PDT 2026


================
@@ -1,4 +1,4 @@
-! RUN: %flang_fc1 -emit-hlfir -fopenmp -fopenmp-assume-teams-oversubscription -fopenmp-assume-threads-oversubscription -o - %s | FileCheck %s
+! RUN: %flang_fc1 -emit-hlfir -fopenmp -fopenmp-version=50 -fopenmp-assume-teams-oversubscription -fopenmp-assume-threads-oversubscription -o - %s | FileCheck %s
----------------
Saieiei wrote:

Without the new `-fopenmp-version=50`, this test aborts in lowering (`createAndSetPrivatizedLoopVar`). A LOOP inside PARALLEL and a TEAMS LOOP do the same with plain `-fopenmp` or `-fopenmp-version=45`, while the base compiles them. The LOOP descriptor starts at 5.0, so IsClauseAllowedOnDirective finds no clauses below it. The required clause check has the same gap: a bare `depobj(d)` also asserts, and DECLARE VARIANT without MATCH or INTEROP without an action clause compile. Looking up the first version where every leaf has an entry fixes these for me.

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


More information about the llvm-branch-commits mailing list