diff options
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 22d936b..b11a5a0 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 0000000..b27673d --- /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 |