[flang-commits] [flang] [flang][OpenMP] Privatize indirectly referenced symbols (PR #187097)

Steve Scalpone via flang-commits flang-commits at lists.llvm.org
Mon Mar 30 06:48:47 PDT 2026


sscalpone wrote:

@lupori  I'm seeing a regression in Fujitsu test 0686/0686_0020.f90.  The test prints "pass" even if the test fails like many other Fujitsu tests.
```
% flang -fopenmp 0686/0686_0020.f90
% a.out
 11 0 0 0
 11 0 0 0
 11 1630495337 1751347809 1965896758
 pass
```
```
      module mod
       integer::i,ii,iii,iiii
       integer::j,jj,jjj,jjjj
       integer::k=0
      end module

      program ompv2
      use mod

!$omp parallel

!$omp do reduction(+:k),lastprivate(i,ii,iii,iiii)
      do i=1,10
      do ii=1,10
      do iii=1,10
      do iiii=1,10
        k=k+1
      enddo
      enddo
      enddo
      enddo
...
      if (i/=11.or.ii/=11.or.iii/=11.or.iiii/=11) print *,i,ii,iii,iiii
```
And ii, iii, and iiii are printing as 0.

https://github.com/llvm/llvm-project/pull/187097


More information about the flang-commits mailing list