2017-01-26 David Sherwood <david.sherwood@arm.com>
gcc/
PR middle-end/79212
* gimplify.c (omp_notice_variable): Add GOVD_SEEN flag to variables in
all contexts.
gcc/testsuite/
PR middle-end/79212
* gfortran.dg/gomp/sharing-4.f90: New test.
From-SVN: r244922
+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
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);
}
}
+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
--- /dev/null
+! { 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