Commit 45d5889a by Tobias Burnus Committed by Tobias Burnus

re PR fortran/52161 (Internal compiler errors with -fcheck=bounds in coarray tests)

2012-11-28  Tobias Burnus  <burnus@net-b.de>

        PR fortran/52161
        * trans-stmt.c (gfc_trans_sync): Fix bound checking
        for -fcoarray=lib.

2012-11-28  Tobias Burnus  <burnus@net-b.de>

        PR fortran/52161
        * coarray/sync_3.f90: Extend test.

From-SVN: r193924
parent 2bc462ea
2012-11-28 Tobias Burnus <burnus@net-b.de>
PR fortran/52161
* trans-stmt.c (gfc_trans_sync): Fix bound checking
for -fcoarray=lib.
2012-11-28 Tobias Burnus <burnus@net-b.de>
PR fortran/52161
* trans-stmt.c (gfc_trans_sync): Fix bound checking.
2012-11-27 Tobias Burnus <burnus@net-b.de>
......
......@@ -784,12 +784,12 @@ gfc_trans_sync (gfc_code *code, gfc_exec_op type)
else
{
tree cond2;
cond = fold_build2_loc (input_location, GE_EXPR, boolean_type_node,
cond = fold_build2_loc (input_location, GT_EXPR, boolean_type_node,
images, gfort_gvar_caf_num_images);
cond2 = fold_build2_loc (input_location, LT_EXPR, boolean_type_node,
images,
build_int_cst (TREE_TYPE (images), 1));
cond = fold_build2_loc (input_location, TRUTH_AND_EXPR,
cond = fold_build2_loc (input_location, TRUTH_OR_EXPR,
boolean_type_node, cond, cond2);
}
gfc_trans_runtime_check (true, false, cond, &se.pre,
......
2012-11-28 Tobias Burnus <burnus@net-b.de>
PR fortran/52161
* coarray/sync_3.f90: Extend test.
2012-11-29 Jakub Jelinek <jakub@redhat.com>
PR rtl-optimization/55512
......
! { dg-do run }
! { dg-options "-fcheck=all" }
! { dg-shouldfail "Invalid image number -1 in SYNC IMAGES" }
!
! As sync_1, but with bounds checking enabled.
! PR fortran/52161
......@@ -65,4 +66,10 @@ n = 5
sync images (*,errmsg=str,stat=n)
if (n /= 0) call abort()
n = -1
sync images ( num_images() )
sync images (n) ! Invalid: "-1"
end
! { dg-output "Fortran runtime error: Invalid image number -1 in SYNC IMAGES" }
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