Open
Description
Here's a test program:
program bug
integer, pointer :: pvar
integer, target :: tvar
tvar = 2
pvar => tvar
!$omp parallel private (pvar, tvar)
tvar = 1
pvar => tvar
!$omp end parallel
if (pvar/=2) stop 'fail'
print *, 'ok'
end program
I compile this program with flang-new -fopenmp bug.f90
. When I execute it, I get the output:
Fortran STOP: fail
IEEE arithmetic exceptions signaled: INEXACT
When I compile and execute the same program with gfortran -fopenmp bug.f90
, I get the output:
ok