aboutsummaryrefslogtreecommitdiff
path: root/libgomp
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2007-09-28 15:22:18 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2007-09-28 15:22:18 +0200
commitbd69daef031ae2afefc43f72e5050e006dc142fe (patch)
tree3275637027c5a5e8ba5a13f9596eeb22d0dcd08e /libgomp
parentb0aa2390573e52199741ce74eaac3102ea631370 (diff)
downloadgcc-bd69daef031ae2afefc43f72e5050e006dc142fe.zip
gcc-bd69daef031ae2afefc43f72e5050e006dc142fe.tar.gz
gcc-bd69daef031ae2afefc43f72e5050e006dc142fe.tar.bz2
openmp_stack.f90: Removed.
* gfortran.dg/openmp_stack.f90: Removed. * testsuite/libgomp.fortran/stack.f90: New test. From-SVN: r128863
Diffstat (limited to 'libgomp')
-rw-r--r--libgomp/ChangeLog4
-rw-r--r--libgomp/testsuite/libgomp.fortran/stack.f9021
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