mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-16 17:37:03 +00:00

This PR adds all the missing semantics for the Linear clause based on the OpenMP 5.2 restrictions. The restriction details are mentioned below. OpenMP 5.2: 5.4.6 linear Clause restrictions - A linear-modifier may be specified as ref or uval only on a declare simd directive. - If linear-modifier is not ref, all list items must be of type integer. - If linear-modifier is ref or uval, all list items must be dummy arguments without the VALUE attribute. - List items must not be Cray pointers or variables that have the POINTER attribute. Cray pointer support has been deprecated. - If linear-modifier is ref, list items must be polymorphic variables, assumed-shape arrays, or variables with the ALLOCATABLE attribute. - A common block name must not appear in a linear clause. - The list-item cannot appear more than once 4.4.4 ordered Clause restriction - If n is explicitly specified, a linear clause must not be specified on the same directive. 5.11 aligned Clause restriction - Each list item must have C_PTR or Cray pointer type or have the POINTER or ALLOCATABLE attribute. Cray pointer support has been deprecated.