summaryrefslogtreecommitdiff
path: root/libgomp
diff options
context:
space:
mode:
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2016-08-19 15:30:33 +0000
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2016-08-19 15:30:33 +0000
commit21812067e1f532cebdedb81c5f51b6bf2ee51910 (patch)
treec842c4c7d0803c5787383e84c95b89f6c746b55b /libgomp
parent9354a9a5e618c0896c4ce7cdf35c8dc79bdae8f6 (diff)
downloadgcc-21812067e1f532cebdedb81c5f51b6bf2ee51910.tar.gz
PR fortran/71014
* resolve.c (gfc_resolve): For ns->construct_entities don't save, clear and restore omp state around the resolving. * testsuite/libgomp.fortran/pr71014.f90: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@239620 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgomp')
-rw-r--r--libgomp/ChangeLog5
-rw-r--r--libgomp/testsuite/libgomp.fortran/pr71014.f9020
2 files changed, 25 insertions, 0 deletions
diff --git a/libgomp/ChangeLog b/libgomp/ChangeLog
index 5849aca7e50..32b11ec067f 100644
--- a/libgomp/ChangeLog
+++ b/libgomp/ChangeLog
@@ -1,3 +1,8 @@
+2016-08-19 Jakub Jelinek <jakub@redhat.com>
+
+ PR fortran/71014
+ * testsuite/libgomp.fortran/pr71014.f90: New test.
+
2016-08-18 Chung-Lin Tang <cltang@codesourcery.com>
PR middle-end/70895
diff --git a/libgomp/testsuite/libgomp.fortran/pr71014.f90 b/libgomp/testsuite/libgomp.fortran/pr71014.f90
new file mode 100644
index 00000000000..6d0d6bec46d
--- /dev/null
+++ b/libgomp/testsuite/libgomp.fortran/pr71014.f90
@@ -0,0 +1,20 @@
+! PR fortran/71014
+! { dg-do run }
+! { dg-additional-options "-O0" }
+
+program pr71014
+ implicit none
+ integer :: i, j
+ integer, parameter :: t = 100*101/2
+ integer :: s(16)
+ s(:) = 0
+!$omp parallel do
+ do j = 1, 16
+ associate (k => j)
+ do i = 1, 100
+ s(j) = s(j) + i
+ end do
+ end associate
+ end do
+ if (any(s /= t)) call abort
+end program pr71014