-
Notifications
You must be signed in to change notification settings - Fork 12.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Flang][OpenMP] Compilation error when type complex is used with expression-stmt in atomic construct #83760
Comments
@llvm/issue-subscribers-openmp Author: None (ohno-fj)
```
Version of flang-new : 19.0.0(dd7386d)/AArch64
```
If type The following are the test program, Flang-new, Gfortran and ifort compilation result. omp_PARALLEL_001c_21.f90: program main
complex(kind=8)::ca
ca = (0.0,0.0)
!$omp parallel
!$omp atomic
ca = ca + (1.0,0.0)
!$omp end parallel
write(6,*) "pass"
end
|
@llvm/issue-subscribers-flang-ir Author: None (ohno-fj)
```
Version of flang-new : 19.0.0(dd7386d)/AArch64
```
If type The following are the test program, Flang-new, Gfortran and ifort compilation result. omp_PARALLEL_001c_21.f90: program main
complex(kind=8)::ca
ca = (0.0,0.0)
!$omp parallel
!$omp atomic
ca = ca + (1.0,0.0)
!$omp end parallel
write(6,*) "pass"
end
|
I get the LLVM ERROR with the latest main: $ flang-new x.f90 -fopenmp && ./a.out
error: ~/Projects/llvm-project/flang/lib/Lower/DirectivesCommon.h:163: not yet implemented: Unsupported atomic type
LLVM ERROR: aborting |
…xchange libcalls for complex types in atomic update (#92364) This patch adds functionality to emit relevant libcalls in case atomicrmw instruction can not be emitted (for instance, in case of complex types). The IRBuilder is modified to directly emit __atomic_load and __atomic_compare_exchange libcalls. The added functions follow a similar codegen path as Clang, so that LLVM Flang generates almost similar IR as Clang. Fixes #83760 and #75138 Co-authored-by: Michael Kruse <llvm-project@meinersbur.de>
…xchange libcalls for complex types in atomic update (llvm#92364) This patch adds functionality to emit relevant libcalls in case atomicrmw instruction can not be emitted (for instance, in case of complex types). The IRBuilder is modified to directly emit __atomic_load and __atomic_compare_exchange libcalls. The added functions follow a similar codegen path as Clang, so that LLVM Flang generates almost similar IR as Clang. Fixes llvm#83760 and llvm#75138 Co-authored-by: Michael Kruse <llvm-project@meinersbur.de>
If type
complex
is used withexpression-stmt
inatomic
construct, the compilation terminates abnormally.If type
complex
is changed to typereal
orinteger
, the compilation terminates normally.The following are the test program, Flang-new, Gfortran and ifort compilation result.
omp_PARALLEL_001c_21.f90:
The text was updated successfully, but these errors were encountered: