re PR fortran/47886 (ICE: OpenMP !$omp task if(omp_get_num_threads() > 0))
authorJakub Jelinek <jakub@redhat.com>
Sun, 27 Feb 2011 12:05:36 +0000 (13:05 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Sun, 27 Feb 2011 12:05:36 +0000 (13:05 +0100)
PR fortran/47886
* gfortran.dg/gomp/task-1.f90: Removed.

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

From-SVN: r170535

gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/gomp/task-1.f90 [deleted file]
libgomp/ChangeLog
libgomp/testsuite/libgomp.fortran/task3.f90 [new file with mode: 0644]

index 8c5a37982c91ce6aea41f97f8e8d47798f415182..f1f0bc612b4590d6fe1ad6dd3d229c32405438f4 100644 (file)
@@ -1,3 +1,8 @@
+2011-02-27  Jakub Jelinek  <jakub@redhat.com>
+
+       PR fortran/47886
+       * gfortran.dg/gomp/task-1.f90: Removed.
+
 2011-02-26  Jason Merrill  <jason@redhat.com>
 
        * g++.dg/template/this-targ1.C: New.
diff --git a/gcc/testsuite/gfortran.dg/gomp/task-1.f90 b/gcc/testsuite/gfortran.dg/gomp/task-1.f90
deleted file mode 100644 (file)
index 227902c..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-! { dg-do compile }
-! { dg-options "-fopenmp" }
-!
-! PR fortran/47886
-!
-! Test case contributed by Bill Long
-
-!  derived from OpenMP test OMP3f/F03_2_7_1d.F90
-program F03_2_7_1d
-   use omp_lib
-   implicit none
-   integer, parameter :: NT = 4
-   integer :: sum = 0
-
-   call omp_set_num_threads(NT); 
-
-   !$omp parallel
-   !$omp task if(omp_get_num_threads() > 0)
-   !$omp atomic
-      sum = sum + 1
-   !$omp end task
-   !$omp end parallel
-   if (sum /= NT) then
-      print *, "FAIL - sum == ", sum, " (expected ", NT, ")"
-      stop 1;
-   end if
-end program F03_2_7_1d
index 33b4e2c91391105c7ee0216b9513d4b2811223b3..f7a598252a274c5f2bb1d6b9ef955707b163bb91 100644 (file)
@@ -1,3 +1,8 @@
+2011-02-27  Jakub Jelinek  <jakub@redhat.com>
+
+       PR fortran/47886
+       * testsuite/libgomp.fortran/task3.f90: New test.
+
 2011-02-24  Tobias Burnus  <burnus@net-b.de>
 
        * libgomp.texi (GOMP_STACKSIZE): Fix @ref to OMP_STACKSIZE.
diff --git a/libgomp/testsuite/libgomp.fortran/task3.f90 b/libgomp/testsuite/libgomp.fortran/task3.f90
new file mode 100644 (file)
index 0000000..30ff980
--- /dev/null
@@ -0,0 +1,27 @@
+! { dg-do run }
+! { dg-options "-fopenmp" }
+!
+! PR fortran/47886
+!
+! Test case contributed by Bill Long
+
+!  derived from OpenMP test OMP3f/F03_2_7_1d.F90
+program F03_2_7_1d
+   use omp_lib
+   implicit none
+   integer, parameter :: NT = 4
+   integer :: sum = 0
+
+   call omp_set_num_threads(NT); 
+
+   !$omp parallel
+   !$omp task if(omp_get_num_threads() > 0)
+   !$omp atomic
+      sum = sum + 1
+   !$omp end task
+   !$omp end parallel
+   if (sum /= NT) then
+      print *, "FAIL - sum == ", sum, " (expected ", NT, ")"
+      call abort
+   end if
+end program F03_2_7_1d