llvm / llvm/llvm-project

[Flang][OpenMP] Conditional lastprivate support

Open
#187,082 0 comments 0 reactions 1 assignee Claimed by @sshrestha-aa View on GitHub
flang:openmp
Dominant language
LLVM
Stars
40.5k
Forks
18.7k
PR merge metrics
PR metrics pending

Description

The conditional modifier for the lastprivate clause was introduced in OpenMP 5.0 but does not appear to be fully supported or correctly lowered in the current Flang compiler.

Example:
```fortran
!$omp parallel do lastprivate(conditional: x,y)
do k = 1, n
if (a(k) < 100) then
y = k
endif
if (a(k) < 150 ) then
x = k + 1
endif
end do
```

Error/Warnings:
```
warning: OpenMP support for version 50 in flang is still incomplete
error: loc("test.F90":14:5): llvm-project/flang/lib/Lower/OpenMP/Utils.cpp:647: not yet implemented: lastprivate clause with CONDITIONAL modifier
LLVM ERROR: aborting
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.