mirror of git://gcc.gnu.org/git/gcc.git
re PR fortran/46753 (ICE: OpenMP - in extract_omp_for_data, at omp-low.c:335)
PR fortran/46753 * trans-openmp.c (gfc_trans_omp_do): Use build2_loc instead of fold_build2_loc for OMP_FOR conditions. * libgomp.fortran/pr46753.f90: New test. From-SVN: r167372
This commit is contained in:
parent
4c698cf891
commit
edaadf74d4
|
|
@ -1,3 +1,9 @@
|
||||||
|
2010-12-02 Jakub Jelinek <jakub@redhat.com>
|
||||||
|
|
||||||
|
PR fortran/46753
|
||||||
|
* trans-openmp.c (gfc_trans_omp_do): Use build2_loc instead of
|
||||||
|
fold_build2_loc for OMP_FOR conditions.
|
||||||
|
|
||||||
2010-11-30 Janne Blomqvist <jb@gcc.gnu.org>
|
2010-11-30 Janne Blomqvist <jb@gcc.gnu.org>
|
||||||
|
|
||||||
PR fortran/28105
|
PR fortran/28105
|
||||||
|
|
|
||||||
|
|
@ -1262,10 +1262,10 @@ gfc_trans_omp_do (gfc_code *code, stmtblock_t *pblock,
|
||||||
if (simple)
|
if (simple)
|
||||||
{
|
{
|
||||||
TREE_VEC_ELT (init, i) = build2_v (MODIFY_EXPR, dovar, from);
|
TREE_VEC_ELT (init, i) = build2_v (MODIFY_EXPR, dovar, from);
|
||||||
TREE_VEC_ELT (cond, i) = fold_build2_loc (input_location, simple > 0
|
/* The condition should not be folded. */
|
||||||
? LE_EXPR : GE_EXPR,
|
TREE_VEC_ELT (cond, i) = build2_loc (input_location, simple > 0
|
||||||
boolean_type_node, dovar,
|
? LE_EXPR : GE_EXPR,
|
||||||
to);
|
boolean_type_node, dovar, to);
|
||||||
TREE_VEC_ELT (incr, i) = fold_build2_loc (input_location, PLUS_EXPR,
|
TREE_VEC_ELT (incr, i) = fold_build2_loc (input_location, PLUS_EXPR,
|
||||||
type, dovar, step);
|
type, dovar, step);
|
||||||
TREE_VEC_ELT (incr, i) = fold_build2_loc (input_location,
|
TREE_VEC_ELT (incr, i) = fold_build2_loc (input_location,
|
||||||
|
|
@ -1290,9 +1290,10 @@ gfc_trans_omp_do (gfc_code *code, stmtblock_t *pblock,
|
||||||
count = gfc_create_var (type, "count");
|
count = gfc_create_var (type, "count");
|
||||||
TREE_VEC_ELT (init, i) = build2_v (MODIFY_EXPR, count,
|
TREE_VEC_ELT (init, i) = build2_v (MODIFY_EXPR, count,
|
||||||
build_int_cst (type, 0));
|
build_int_cst (type, 0));
|
||||||
TREE_VEC_ELT (cond, i) = fold_build2_loc (input_location, LT_EXPR,
|
/* The condition should not be folded. */
|
||||||
boolean_type_node,
|
TREE_VEC_ELT (cond, i) = build2_loc (input_location, LT_EXPR,
|
||||||
count, tmp);
|
boolean_type_node,
|
||||||
|
count, tmp);
|
||||||
TREE_VEC_ELT (incr, i) = fold_build2_loc (input_location, PLUS_EXPR,
|
TREE_VEC_ELT (incr, i) = fold_build2_loc (input_location, PLUS_EXPR,
|
||||||
type, count,
|
type, count,
|
||||||
build_int_cst (type, 1));
|
build_int_cst (type, 1));
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,8 @@
|
||||||
2010-12-02 Jakub Jelinek <jakub@redhat.com>
|
2010-12-02 Jakub Jelinek <jakub@redhat.com>
|
||||||
|
|
||||||
|
PR fortran/46753
|
||||||
|
* libgomp.fortran/pr46753.f90: New test.
|
||||||
|
|
||||||
PR libgomp/43706
|
PR libgomp/43706
|
||||||
* env.c (initialize_env): Default to spin count 300000
|
* env.c (initialize_env): Default to spin count 300000
|
||||||
instead of 20000000 if neither OMP_WAIT_POLICY nor GOMP_SPINCOUNT
|
instead of 20000000 if neither OMP_WAIT_POLICY nor GOMP_SPINCOUNT
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,17 @@
|
||||||
|
! PR fortran/46753
|
||||||
|
! { dg-do run }
|
||||||
|
|
||||||
|
integer :: i, j
|
||||||
|
j = 0
|
||||||
|
!$omp parallel do reduction(+:j)
|
||||||
|
do i = 2147483636, 2147483646
|
||||||
|
j = j + 1
|
||||||
|
end do
|
||||||
|
if (j.ne.11) call abort
|
||||||
|
j = 0
|
||||||
|
!$omp parallel do reduction(+:j)
|
||||||
|
do i = -2147483637, -2147483647, -1
|
||||||
|
j = j + 1
|
||||||
|
end do
|
||||||
|
if (j.ne.11) call abort
|
||||||
|
end
|
||||||
Loading…
Reference in New Issue