llvm-project
6e62d40b - [flang][OpenMP] Fix LINEAR clause validation and test expectations (#175707)

Commit
138 days ago
[flang][OpenMP] Fix LINEAR clause validation and test expectations (#175707) Fixes #175688 After #175383 was merged, the test `Semantics/OpenMP/linear-clause01.f90` was failing because it had an early return that prevented multiple errors from being reported. This PR fixes two issues: 1. **Removes the early return** after detecting a modifier error on DO/SIMD directives. Previously, when a modifier error was found, the function would return immediately without checking other restrictions like the scalar requirement. Now all applicable errors are reported. 2. **Updates test expectations** to expect both the modifier error AND the scalar error for Case 1, where `arg(:)` is an array used with `uval` modifier on a DO directive. Thanks to @NimishMishra for catching this during review - arrays should always be rejected in LINEAR clauses (except for `declare simd` with `ref` modifier), regardless of whether there are other errors.
Author
Parents
Loading