Issue 102939
Summary [flang][openmp] Bad code for "private" directive with pointers and targets
Labels bug, flang:openmp
Assignees
Reporter psteinfeld
    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
```
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to