summaryrefslogtreecommitdiff
path: root/libgomp/testsuite/libgomp.fortran/allocatable3.f90
diff options
context:
space:
mode:
Diffstat (limited to 'libgomp/testsuite/libgomp.fortran/allocatable3.f90')
-rw-r--r--libgomp/testsuite/libgomp.fortran/allocatable3.f9021
1 files changed, 21 insertions, 0 deletions
diff --git a/libgomp/testsuite/libgomp.fortran/allocatable3.f90 b/libgomp/testsuite/libgomp.fortran/allocatable3.f90
new file mode 100644
index 000000000..fe3714a2b
--- /dev/null
+++ b/libgomp/testsuite/libgomp.fortran/allocatable3.f90
@@ -0,0 +1,21 @@
+! { dg-do run }
+
+ integer, allocatable :: a(:)
+ integer :: i
+ logical :: l
+ l = .false.
+ if (allocated (a)) call abort
+!$omp parallel private (a) reduction (.or.:l)
+ allocate (a (-7:-5))
+ l = l.or..not.allocated (a)
+ l = l.or.size(a).ne.3.or.size(a,1).ne.3
+ a(:) = 0
+ !$omp do private (a)
+ do i = 1, 7
+ a(:) = i
+ l = l.or.any (a.ne.i)
+ end do
+ l = l.or.any (a.ne.0)
+ deallocate (a)
+!$omp end parallel
+end