Closed
Description
For the following program, logically, the variable x
should give 0. However, LLVM flang gives an inexact negative value -1.E-45. In contrast, gfortran gives an exact 0.
program sample
real :: x, y(100)
x = 0
do i = 1, 100
y(i) = i
end do
!$omp parallel do reduction(min:x)
do i = 1, 100
x = min(y(i), x)
end do
!$omp end parallel do
end program sample