diff options
author | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-02-28 12:59:41 +0000 |
---|---|---|
committer | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-02-28 12:59:41 +0000 |
commit | 09eb54e6ca869e29c0ff45081854e361867e2c62 (patch) | |
tree | 0e387aa41d461aa0556ffaa55c8b484ea830c982 /libgomp | |
parent | 7c5d01e716298af3e82b47658d3c56424c346401 (diff) | |
download | gcc-09eb54e6ca869e29c0ff45081854e361867e2c62.tar.gz |
2011-02-28 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk rev 170526 using svnmerge
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@170560 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgomp')
-rw-r--r-- | libgomp/ChangeLog | 5 | ||||
-rw-r--r-- | libgomp/testsuite/libgomp.fortran/task3.f90 | 27 |
2 files changed, 32 insertions, 0 deletions
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 <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 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 |