llvm-project
914a233a - [Flang][OpenMP] Reject INTENT(IN) pointers in LASTPRIVATE clause (#178845)

Commit
6 days ago
[Flang][OpenMP] Reject INTENT(IN) pointers in LASTPRIVATE clause (#178845) `LASTPRIVATE` clause requires the list item to be definable since the value from the last iteration is assigned back to the original variable. For pointers, this assignment occurs "as if by pointer assignment" (OpenMP 5.2 Section 5.4.5). An `INTENT(IN)` pointer dummy argument is not a valid target for pointer assignment, therefore it should not be permitted in a `LASTPRIVATE` clause. This patch adds the `CheckIntentInPointer()` call to the `LASTPRIVATE` clause handler, consistent with other data-sharing clauses like `PRIVATE`, `COPYPRIVATE`, and `REDUCTION`. Fixes [#178398](https://github.com/llvm/llvm-project/issues/178398)
Author
Parents
Loading