You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
Initialization of reduction variable for min-reduction is set to largest
negative value. As such, in presence of non-negative operands, min
reduction gives incorrect output. This patch initialises min-reduction
to use the maximum positive value instead, so that it can produce
correct output for the entire range of real valued operands.
Fixes#73101
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.The text was updated successfully, but these errors were encountered: