[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)

Raghu Maddhipatla via flang-commits flang-commits at lists.llvm.org
Tue Dec 5 07:15:33 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
----------------
raghavendhra wrote:

I think this restriction is something on the lines of "If the list-item in an is_device_ptr clause is a dummy argument it should not have ALLOCATABLE, POINTER or VALUE attributes."

I think this following text might not have completely meant that all list-items must be dummy arguments only I think the conjunction of "does not have the ALLOCATABLE, POINTER or VALUE attribute" might be the reason for the "must". 
`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.`

Also, this restriction is not present from OpenMP 5.1 onwards through which I assumed it might not be originally intended for OpenMP spec committee might not have intended to restricted list-item of is_device_ptr clause to be dummy argument only.

Please correct me if I am interpreting it incorrectly. :)

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


More information about the flang-commits mailing list