]> oss.titaniummirror.com Git - msp430-gcc.git/blobdiff - libgomp/testsuite/libgomp.fortran/pr27416-1.f90
Imported gcc-4.4.3
[msp430-gcc.git] / libgomp / testsuite / libgomp.fortran / pr27416-1.f90
diff --git a/libgomp/testsuite/libgomp.fortran/pr27416-1.f90 b/libgomp/testsuite/libgomp.fortran/pr27416-1.f90
new file mode 100644 (file)
index 0000000..d42e1ef
--- /dev/null
@@ -0,0 +1,19 @@
+! 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