Closed
Description
Reproducible on Godbolt
https://godbolt.org/z/P8qY5PqMd
Reproducer (reduced from https://github.com/gcc-mirror/gcc/blob/master/libgomp/testsuite/libgomp.fortran/omp_atomic4.f90)
$ cat omp_atomic4_reduced.f90
real :: c
double precision :: c2
!$omp atomic capture
c2 = c
c = 2.0 * c
!$omp end atomic
end
$ flang-new -fopenmp omp_atomic4_reduced.f90
error: loc("/tmp/omp_atomic4_reduced.f90":1:5): the type of the operand must be a pointer type whose element type is the same as that of the region argument
error: verification of lowering to FIR failed
If I change c = 2.0 * c
in the program into c = 2.0
, the following is obtained. So I think this is related to (or essentially identical to) #83144.
error: address must dereference to value type
error: verification of lowering to FIR failed