aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.2.1-5666.3/libgomp/testsuite/libgomp.fortran/nestedfn3.f90
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.2.1-5666.3/libgomp/testsuite/libgomp.fortran/nestedfn3.f90')
-rw-r--r--gcc-4.2.1-5666.3/libgomp/testsuite/libgomp.fortran/nestedfn3.f9024
1 files changed, 24 insertions, 0 deletions
diff --git a/gcc-4.2.1-5666.3/libgomp/testsuite/libgomp.fortran/nestedfn3.f90 b/gcc-4.2.1-5666.3/libgomp/testsuite/libgomp.fortran/nestedfn3.f90
new file mode 100644
index 000000000..454749c54
--- /dev/null
+++ b/gcc-4.2.1-5666.3/libgomp/testsuite/libgomp.fortran/nestedfn3.f90
@@ -0,0 +1,24 @@
+! PR middle-end/28790
+! { dg-do run }
+
+program nestomp
+ integer :: j
+ j = 8
+ call bar
+ if (j.ne.10) call abort
+contains
+ subroutine foo (i)
+ integer :: i
+ !$omp atomic
+ j = j + i - 5
+ end subroutine
+ subroutine bar
+ use omp_lib
+ integer :: i
+ i = 6
+ call omp_set_dynamic (.false.)
+ !$omp parallel num_threads (2)
+ call foo(i)
+ !$omp end parallel
+ end subroutine
+end