X-Git-Url: https://oss.titaniummirror.com/gitweb?a=blobdiff_plain;f=libgomp%2Ftestsuite%2Flibgomp.fortran%2Fpr27916-1.f90;fp=libgomp%2Ftestsuite%2Flibgomp.fortran%2Fpr27916-1.f90;h=7f6b51d0892d4519e32581ef4a65cf8c69c9c32d;hb=6fed43773c9b0ce596dca5686f37ac3fc0fa11c0;hp=0000000000000000000000000000000000000000;hpb=27b11d56b743098deb193d510b337ba22dc52e5c;p=msp430-gcc.git diff --git a/libgomp/testsuite/libgomp.fortran/pr27916-1.f90 b/libgomp/testsuite/libgomp.fortran/pr27916-1.f90 new file mode 100644 index 00000000..7f6b51d0 --- /dev/null +++ b/libgomp/testsuite/libgomp.fortran/pr27916-1.f90 @@ -0,0 +1,26 @@ +! PR fortran/27916 +! Test whether allocatable privatized arrays has "not currently allocated" +! status at the start of OpenMP constructs. +! { dg-do run } + +program pr27916 + integer :: n, i + logical :: r + integer, dimension(:), allocatable :: a + + r = .false. +!$omp parallel do num_threads (4) private (n, a, i) & +!$omp & reduction (.or.: r) schedule (static) + do n = 1, 16 + r = r .or. allocated (a) + allocate (a (16)) + r = r .or. .not. allocated (a) + do i = 1, 16 + a (i) = i + end do + deallocate (a) + r = r .or. allocated (a) + end do + !$omp end parallel do + if (r) call abort +end program pr27916