[flang-commits] [flang] [flang][OpenMP] Fix verification of REF modifier on LINEAR clause (PR #232367)
Krzysztof Parzyszek via flang-commits
flang-commits at lists.llvm.org
Thu Oct 15 08:56:55 PDT 2026
================
@@ -68,3 +67,24 @@ subroutine linear_clause_04(x)
end do
!$omp end simd
end subroutine linear_clause_04
+
+! Case 5
+subroutine linear_clause_05(x)
+ integer :: x(:)
+ !ERROR: The list item `x` specified with the REF 'linear-modifier' must not be polymorphic variable, assumed-shape array, or a variable with the `ALLOCATABLE` attribute
+ !$omp declare simd linear(x : ref)
+end subroutine linear_clause_05
+
+! Case 6
+subroutine linear_clause_06(x)
+ integer, allocatable :: x(:)
+ !ERROR: The list item `x` specified with the REF 'linear-modifier' must not be polymorphic variable, assumed-shape array, or a variable with the `ALLOCATABLE` attribute
----------------
kparzysz wrote:
```suggestion
!ERROR: The list item `x` specified with the REF 'linear-modifier' must not be a polymorphic variable, an assumed-shape array, or a variable with the `ALLOCATABLE` attribute
```
https://github.com/llvm/llvm-project/pull/232367
More information about the flang-commits
mailing list