re PR tree-optimization/77352 (ICE: verify_ssa failed)
PR fortran/77352 * trans-openmp.c (gfc_trans_omp_parallel_workshare): Always add a BIND_EXPR with BLOCK around what gfc_trans_omp_workshare returns. * gfortran.dg/gomp/pr77352.f90: New test. From-SVN: r239904
This commit is contained in:
parent
f25f40be27
commit
d12a0b5aab
4 changed files with 24 additions and 4 deletions
|
@ -1,5 +1,9 @@
|
|||
2016-08-31 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR fortran/77352
|
||||
* trans-openmp.c (gfc_trans_omp_parallel_workshare): Always add a
|
||||
BIND_EXPR with BLOCK around what gfc_trans_omp_workshare returns.
|
||||
|
||||
PR fortran/77374
|
||||
* parse.c (parse_omp_oacc_atomic): Copy over cp->ext.omp_atomic
|
||||
to cp->block->ext.omp_atomic.
|
||||
|
|
|
@ -4001,10 +4001,7 @@ gfc_trans_omp_parallel_workshare (gfc_code *code)
|
|||
code->loc);
|
||||
pushlevel ();
|
||||
stmt = gfc_trans_omp_workshare (code, &workshare_clauses);
|
||||
if (TREE_CODE (stmt) != BIND_EXPR)
|
||||
stmt = build3_v (BIND_EXPR, NULL, stmt, poplevel (1, 0));
|
||||
else
|
||||
poplevel (0, 0);
|
||||
stmt = build3_v (BIND_EXPR, NULL, stmt, poplevel (1, 0));
|
||||
stmt = build2_loc (input_location, OMP_PARALLEL, void_type_node, stmt,
|
||||
omp_clauses);
|
||||
OMP_PARALLEL_COMBINED (stmt) = 1;
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
2016-08-31 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR fortran/77352
|
||||
* gfortran.dg/gomp/pr77352.f90: New test.
|
||||
|
||||
PR fortran/77374
|
||||
* gfortran.dg/gomp/pr77374.f08: New test.
|
||||
|
||||
|
|
16
gcc/testsuite/gfortran.dg/gomp/pr77352.f90
Normal file
16
gcc/testsuite/gfortran.dg/gomp/pr77352.f90
Normal file
|
@ -0,0 +1,16 @@
|
|||
! PR fortran/77352
|
||||
! { dg-do compile }
|
||||
! { dg-additional-options "-fstack-arrays -O2" }
|
||||
! { dg-additional-options "-fopenacc" { target fopenacc } }
|
||||
|
||||
program pr77352
|
||||
real, allocatable :: a(:,:), b(:)
|
||||
integer :: m, n
|
||||
m = 4
|
||||
n = 2
|
||||
allocate (a(m,n), b(m))
|
||||
a = 1.0
|
||||
!$omp parallel workshare
|
||||
b(:) = [ sum(a, dim=1) ]
|
||||
!$omp end parallel workshare
|
||||
end
|
Loading…
Add table
Reference in a new issue