re PR middle-end/79212 (internal compiler error: in maybe_lookup_decl_in_outer_ctx, at omp-low.c:4134)
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
This commit is contained in:
parent
1a27fab1ad
commit
ebff5c3f80
4 changed files with 36 additions and 1 deletions
|
@ -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
|
||||
|
|
|
@ -7152,7 +7152,7 @@ omp_notice_variable (struct gimplify_omp_ctx *ctx, tree decl, bool in_code)
|
|||
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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
24
gcc/testsuite/gfortran.dg/gomp/sharing-4.f90
Normal file
24
gcc/testsuite/gfortran.dg/gomp/sharing-4.f90
Normal file
|
@ -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
|
Loading…
Add table
Reference in a new issue