[flang-commits] [flang] [flang][OpenMP][Semantics] Modify a semantic check which was tightly checking list items in IS_DEVICE_PTR to be only dummy arguments. (PR #74370)
via flang-commits
flang-commits at lists.llvm.org
Tue Dec 5 20:02:04 PST 2023
================
@@ -39,7 +39,6 @@ subroutine bar(b1, b2, b3)
type(c_ptr), pointer :: b2
type(c_ptr), value :: b3
- !ERROR: Variable 'c' in IS_DEVICE_PTR clause must be a dummy argument
----------------
NimishMishra wrote:
So it seems like the type of list item became more restrictive as the standard progressed.
OpenMP 4.5 standard (2.10.4): `A list item that appears in an is_device_ptr clause must be a dummy argument`
OpenMP 5.0 standard (2.12.5): `A list item that appears in an is_device_ptr clause must be a dummy argument that does not have the ALLOCATABLE, POINTER or VALUE attribute.`
However, my understanding of both these statements is leaning similar to @shraiysh's- any list item in this clause has to be a dummy argument, but without any additional attributes from ALLOCATABLE, POINTER, VALUE. In other words, I don't think non-dummy arguments are allowed in this clause. This becomes clear when we look at the OpenMP 4.5 standard wording: it is, without a doubt, restricting all list items within the clause to be dummy arguments.
https://github.com/llvm/llvm-project/pull/74370
More information about the flang-commits
mailing list