gcc/libgomp/testsuite/libgomp.fortran/pr65597.f90
Jakub Jelinek 6c384511a3 re PR middle-end/65597 (ICE in build_outer_var_ref, at omp-low.c:1043)
PR fortran/65597
	* trans-openmp.c (gfc_trans_omp_do): For !simple simd with explicit
	linear clause for the iterator set OMP_CLAUSE_LINEAR_NO_COPYIN.
	For implcitly added !simple OMP_CLAUSE_LINEAR set it too.  Use step 1
	instead of the original step on the new iterator - count.

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

From-SVN: r221776
2015-03-30 19:54:05 +02:00

22 lines
377 B
Fortran

! PR fortran/65597
! { dg-do run }
integer :: i, a(151)
a(:) = 0
!$omp do simd
do i = 1, 151, 31
a(i) = a(i) + 1
end do
!$omp do simd linear (i: 31)
do i = 1, 151, 31
a(i) = a(i) + 1
end do
do i = 1, 151
if (mod (i, 31) .eq. 1) then
if (a(i) .ne. 2) call abort
else
if (a(i) .ne. 0) call abort
end if
end do
end