gcc/libgomp/testsuite/libgomp.fortran/pr27416-1.f90
Jakub Jelinek eeb1d9e08e re PR middle-end/27416 (ICE on invalid firstprivate/lastprivate)
PR middle-end/27416
	* omp-low.c (build_outer_var_ref): If VAR is reference in orphaned
	construct, return *VAR.

	* libgomp.fortran/pr27416-1.f90: New test.

From-SVN: r113788
2006-05-15 11:59:30 +02:00

20 lines
310 B
Fortran

! PR middle-end/27416
! { dg-do run }
integer :: j
j = 6
!$omp parallel num_threads (4)
call foo (j)
!$omp end parallel
if (j.ne.6+16) call abort
end
subroutine foo (j)
integer :: i, j
!$omp do firstprivate (j) lastprivate (j)
do i = 1, 16
if (i.eq.16) j = j + i
end do
end subroutine foo