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.
From-SVN: r237916
+2016-07-01 Jakub Jelinek <jakub@redhat.com>
+
+ PR fortran/71717
+ * trans-openmp.c (gfc_omp_privatize_by_reference): Return false
+ for GFC_DECL_ASSOCIATE_VAR_P with POINTER_TYPE.
+
2016-06-30 Jakub Jelinek <jakub@redhat.com>
PR fortran/71704
if (GFC_DECL_GET_SCALAR_POINTER (decl)
|| GFC_DECL_GET_SCALAR_ALLOCATABLE (decl)
|| GFC_DECL_CRAY_POINTEE (decl)
+ || GFC_DECL_ASSOCIATE_VAR_P (decl)
|| VOID_TYPE_P (TREE_TYPE (TREE_TYPE (decl))))
return false;
+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.
--- /dev/null
+! 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