Commit d12a0b5a by Jakub Jelinek Committed by Jakub Jelinek

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
parent f25f40be
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;
......
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.
......
! 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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment