[Flang][OpenMP] Incorrect execution result when a variable declared by both common and namelist statement is used in do reduction construct and namelist-group-name is output #101907
Version of flang-new : 19.0.0(41211919db5feb279d2954eb590a3cf2a1742152)/AArch64
When a variable declared by both common and namelist statement is used in do reduction construct and namelist-group-name is output, the output is incorrect.
The following are the test program, Flang-new, Gfortran and ifort compilation/execution result.
snggq855_222.f90:
program main
call sub1
end program main
subroutine sub1()
common // im1
namelist /nam/im1
im1=10
!$omp parallel
!$omp do reduction (+:im1)
do j=1,4
im1 = im1 + 1
write(1,nam)
enddo
!$omp enddo
!$omp end parallel
end subroutine sub1
When a variable declared by both
common
andnamelist
statement is used indo reduction
construct andnamelist-group-name
is output, the output is incorrect.The following are the test program, Flang-new, Gfortran and ifort compilation/execution result.
snggq855_222.f90: