diff options
author | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-09-28 13:22:18 +0000 |
---|---|---|
committer | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-09-28 13:22:18 +0000 |
commit | c56154bd27a137199c82cf4535a22c5f2775a014 (patch) | |
tree | 3275637027c5a5e8ba5a13f9596eeb22d0dcd08e /libgomp | |
parent | 6ae096d4a045fb435918241d3b0c05d31aa28cfe (diff) | |
download | ppe42-gcc-c56154bd27a137199c82cf4535a22c5f2775a014.tar.gz ppe42-gcc-c56154bd27a137199c82cf4535a22c5f2775a014.zip |
* gfortran.dg/openmp_stack.f90: Removed.
* testsuite/libgomp.fortran/stack.f90: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@128863 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgomp')
-rw-r--r-- | libgomp/ChangeLog | 4 | ||||
-rw-r--r-- | libgomp/testsuite/libgomp.fortran/stack.f90 | 21 |
2 files changed, 25 insertions, 0 deletions
diff --git a/libgomp/ChangeLog b/libgomp/ChangeLog index 22d936b84ce..b11a5a05104 100644 --- a/libgomp/ChangeLog +++ b/libgomp/ChangeLog @@ -1,3 +1,7 @@ +2007-09-28 Jakub Jelinek <jakub@redhat.com> + + * testsuite/libgomp.fortran/stack.f90: New test. + 2007-09-10 Danny Smith <dannysmith@users.sourceforge.net> * config/mingw32/proc.c: New file. diff --git a/libgomp/testsuite/libgomp.fortran/stack.f90 b/libgomp/testsuite/libgomp.fortran/stack.f90 new file mode 100644 index 00000000000..b27673d01fd --- /dev/null +++ b/libgomp/testsuite/libgomp.fortran/stack.f90 @@ -0,0 +1,21 @@ +! { dg-do run } +program stack + implicit none + integer id + integer ilocs(2) + integer omp_get_thread_num, foo + call omp_set_num_threads (2) +!$omp parallel private (id) + id = omp_get_thread_num() + 1 + ilocs(id) = foo() +!$omp end parallel + ! Check that the two threads are not sharing a location for + ! the array x in foo() + if (ilocs(1) .eq. ilocs(2)) call abort +end program stack + +integer function foo () + implicit none + real x(100,100) + foo = loc(x) +end function foo |