-
Notifications
You must be signed in to change notification settings - Fork 10.7k
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 the variables used in an update-statement
in atomic
construct are declared with different types
#91929
Comments
@llvm/issue-subscribers-openmp Author: None (ohno-fj)
```
Version of flang-new : 19.0.0(1a49810)/AArch64
```
When the variables ( The following are the test program, Flang-new, Gfortran and ifort compilation/execution result. OMP_3_O_007_4_atm_expr_027_up_323.f90: program main
integer(kind=4) :: s_x, i
! integer(kind=4) :: s_expr
real(kind=4) :: s_expr
s_x = 3
s_expr = 3.0
!$omp atomic ! update
s_x = s_x + s_expr
!$omp end atomic
write(6,*) 's_x = ', s_x, ', s_expr = ', s_expr
end program main
|
If there is only one non-terminator operation in the update region then the update operation can be found and we can try to generate an atomicrmw instruction. Otherwise use the cmpxchg loop. Fixes llvm#91929
If there is only one non-terminator operation in the update region then the update operation can be found and we can try to generate an atomicrmw instruction. Otherwise use the cmpxchg loop. Fixes #91929
If there is only one non-terminator operation in the update region then the update operation can be found and we can try to generate an atomicrmw instruction. Otherwise use the cmpxchg loop. Fixes llvm#91929
When the variables (
x
andexpr
) used in anupdate-statement
inatomic
construct are declared with different types, a compilation terminates abnormally.When both variables are declared of the same type, a compilation terminates normally.
The following are the test program, Flang-new, Gfortran and ifort compilation/execution result.
OMP_3_O_007_4_atm_expr_027_up_323.f90:
The text was updated successfully, but these errors were encountered: