gcc/libgomp/testsuite/libgomp.fortran/pr71014.f90
Jakub Jelinek 1cad928453 re PR fortran/71014 (associate statement inside omp parallel do appears to disable default private attribute for inner loop indices)
PR fortran/71014
	* resolve.c (gfc_resolve): For ns->construct_entities don't save, clear
	and restore omp state around the resolving.

	* testsuite/libgomp.fortran/pr71014.f90: New test.

From-SVN: r239620
2016-08-19 17:30:33 +02:00

21 lines
378 B
Fortran

! PR fortran/71014
! { dg-do run }
! { dg-additional-options "-O0" }
program pr71014
implicit none
integer :: i, j
integer, parameter :: t = 100*101/2
integer :: s(16)
s(:) = 0
!$omp parallel do
do j = 1, 16
associate (k => j)
do i = 1, 100
s(j) = s(j) + i
end do
end associate
end do
if (any(s /= t)) call abort
end program pr71014