===================================================================
@@ -1,3 +1,9 @@
+2017-01-26 David Sherwood <david.sherwood@arm.com>
+
+ PR middle-end/79212
+ * gimplify.c (omp_notice_variable): Add GOVD_SEEN flag to variables in
+ all contexts.
+
2017-01-26 Jakub Jelinek <jakub@redhat.com>
PR target/70465
===================================================================
@@ -0,0 +1,24 @@
+! { dg-do compile }
+! { dg-options "-fopenmp" }
+
+subroutine foo (v, n, r)
+ integer :: n
+ integer, intent(in) :: v(:)
+ integer, intent(out) :: r
+ integer :: i
+
+ r = 0
+
+!$omp parallel
+!$omp single
+
+ do i = 1, n
+!$omp task shared (v)
+ r = r + v(i)
+!$omp end task
+ enddo
+
+!$omp end single
+!$omp end parallel
+
+end
===================================================================
@@ -1,3 +1,8 @@
+2017-01-26 David Sherwood <david.sherwood@arm.com>
+
+ PR middle-end/79212
+ * gfortran.dg/gomp/sharing-4.f90: New test.
+
2017-01-26 Jakub Jelinek <jakub@redhat.com>
PR target/70465
===================================================================
@@ -7152,7 +7152,7 @@
gcc_assert (DECL_P (t));
n2 = splay_tree_lookup (ctx->variables, (splay_tree_key) t);
if (n2)
- n2->value |= GOVD_SEEN;
+ omp_notice_variable (ctx, t, true);
}
}