summaryrefslogtreecommitdiff
path: root/libgomp
diff options
context:
space:
mode:
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2016-07-01 15:13:28 +0000
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2016-07-01 15:13:28 +0000
commit5a25e338fb2a17c3f5f950136f457f29f80f3d3c (patch)
tree76e4197fa3c97b1491a427e833fb69f6a75ff09b /libgomp
parent4ce6622a51c1bcbe501289b856f1fb1bb59c082e (diff)
PR fortran/71717
* trans-openmp.c (gfc_omp_privatize_by_reference): Return false for GFC_DECL_ASSOCIATE_VAR_P with POINTER_TYPE. * testsuite/libgomp.fortran/associate3.f90: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@237916 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgomp')
-rw-r--r--libgomp/ChangeLog5
-rw-r--r--libgomp/testsuite/libgomp.fortran/associate3.f9020
2 files changed, 25 insertions, 0 deletions
diff --git a/libgomp/ChangeLog b/libgomp/ChangeLog
index 22049107af10..41bc67c11577 100644
--- a/libgomp/ChangeLog
+++ b/libgomp/ChangeLog
@@ -1,3 +1,8 @@
+2016-07-01 Jakub Jelinek <jakub@redhat.com>
+
+ PR fortran/71717
+ * testsuite/libgomp.fortran/associate3.f90: New test.
+
2016-06-17 Jakub Jelinek <jakub@redhat.com>
* testsuite/libgomp.c++/target-21.C: New test.
diff --git a/libgomp/testsuite/libgomp.fortran/associate3.f90 b/libgomp/testsuite/libgomp.fortran/associate3.f90
new file mode 100644
index 000000000000..ec3d8dc33b94
--- /dev/null
+++ b/libgomp/testsuite/libgomp.fortran/associate3.f90
@@ -0,0 +1,20 @@
+! PR fortran/71717
+! { dg-do run }
+
+ type t
+ real, allocatable :: f(:)
+ end type
+ type (t) :: v
+ integer :: i, j
+ allocate (v%f(4))
+ v%f = 19.
+ i = 5
+ associate (u => v, k => i)
+ !$omp parallel do
+ do j = 1, 4
+ u%f(j) = 21.
+ if (j.eq.1) k = 7
+ end do
+ end associate
+ if (any (v%f(:).ne.21.) .or. i.ne.7) call abort
+end