diff options
Diffstat (limited to 'gcc/testsuite')
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gfortran.dg/gomp/recursion1.f90 | 27 |
2 files changed, 32 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 7705d82..8be8a06 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2009-12-29 Janus Weil <janus@gcc.gnu.org> + + PR fortran/42517 + * gfortran.dg/gomp/recursion1.f90: New test. + 2009-12-29 Eric Botcazou <ebotcazou@adacore.com> * gnat.dg/test_raise_from_pure.adb: XFAIL for the ARM. diff --git a/gcc/testsuite/gfortran.dg/gomp/recursion1.f90 b/gcc/testsuite/gfortran.dg/gomp/recursion1.f90 new file mode 100644 index 0000000..0b7b271 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/gomp/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 |