summaryrefslogtreecommitdiff
path: root/libgomp/testsuite
diff options
context:
space:
mode:
authorbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2010-01-04 07:17:41 +0000
committerbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2010-01-04 07:17:41 +0000
commit14f02f29c87a1dad04bce2f4e73f81c13322e114 (patch)
tree05ab7e1771a466532857290dfb50157c94856ccb /libgomp/testsuite
parent110557507c069b5d503b683d0ea74debd893e025 (diff)
downloadgcc-14f02f29c87a1dad04bce2f4e73f81c13322e114.tar.gz
2010-01-04 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk rev 155603 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@155605 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgomp/testsuite')
-rw-r--r--libgomp/testsuite/libgomp.fortran/recursion1.f9027
1 files changed, 27 insertions, 0 deletions
diff --git a/libgomp/testsuite/libgomp.fortran/recursion1.f90 b/libgomp/testsuite/libgomp.fortran/recursion1.f90
new file mode 100644
index 00000000000..0b7b2715fdd
--- /dev/null
+++ b/libgomp/testsuite/libgomp.fortran/recursion1.f90
@@ -0,0 +1,27 @@
+! { dg-do run }
+! { dg-options "-fopenmp -fcheck=recursion" }
+!
+! PR 42517: Bogus runtime error with -fopenmp -fcheck=recursion
+!
+! Contributed by Janus Weil <janus@gcc.gnu.org>
+
+implicit none
+integer :: i,s
+
+s=0
+!$omp parallel do private(i) shared(s)
+do i=1,10
+ call sub(i)
+end do
+!$omp end parallel do
+if (s/=55) call abort()
+
+contains
+
+ subroutine sub (n)
+ integer :: n
+ s = s + n
+ print '(A,i3)',"loop =",n
+ end subroutine
+
+end