From: Jakub Jelinek Date: Sun, 27 Feb 2011 12:05:36 +0000 (+0100) Subject: re PR fortran/47886 (ICE: OpenMP !$omp task if(omp_get_num_threads() > 0)) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=113a53c14290fae0b8769675cc1dff8d0140c54f;p=gcc.git re PR fortran/47886 (ICE: OpenMP !$omp task if(omp_get_num_threads() > 0)) PR fortran/47886 * gfortran.dg/gomp/task-1.f90: Removed. * testsuite/libgomp.fortran/task3.f90: New test. From-SVN: r170535 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 8c5a37982c9..f1f0bc612b4 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2011-02-27 Jakub Jelinek + + PR fortran/47886 + * gfortran.dg/gomp/task-1.f90: Removed. + 2011-02-26 Jason Merrill * 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 index 227902cbf5a..00000000000 --- a/gcc/testsuite/gfortran.dg/gomp/task-1.f90 +++ /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 diff --git a/libgomp/ChangeLog b/libgomp/ChangeLog index 33b4e2c9139..f7a598252a2 100644 --- a/libgomp/ChangeLog +++ b/libgomp/ChangeLog @@ -1,3 +1,8 @@ +2011-02-27 Jakub Jelinek + + PR fortran/47886 + * testsuite/libgomp.fortran/task3.f90: New test. + 2011-02-24 Tobias Burnus * 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 index 00000000000..30ff9803ea2 --- /dev/null +++ b/libgomp/testsuite/libgomp.fortran/task3.f90 @@ -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