[flang] [flang][OpenMP] Fix verification of REF modifier on LINEAR clause (#2… (PR #234625)

Markus Mützel via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Thu Oct 22 06:49:44 PDT 2026


================
@@ -766,10 +766,10 @@ void OmpStructureChecker::Enter(const parser::OmpClause::Linear &x) {
           if (linearMod->v != parser::OmpLinearModifier::Value::Ref) {
             CheckIntegerNoRef(symbol, source);
           } else {
-            if (!IsAllocatable(*symbol) && !IsAssumedShape(*symbol) &&
-                !IsPolymorphic(*symbol)) {
+            if (IsAllocatable(*symbol) || IsAssumedShape(*symbol) &&
----------------
mmuetzel wrote:

```suggestion
            if (IsAllocatable(*symbol) || IsAssumedShape(*symbol) ||
```

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


More information about the llvm-branch-commits mailing list