From: Francois-Xavier Coudert Date: Thu, 6 Jul 2006 17:12:25 +0000 (+0200) Subject: re PR fortran/27874 (Bad interaction between bounds checking, forall and derived... X-Git-Tag: releases/gcc-4.2.0~2175 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ca86ddcc240fe3ff90d570a385429dad8eedf846;p=thirdparty%2Fgcc.git re PR fortran/27874 (Bad interaction between bounds checking, forall and derived types) PR fortran/27874 * trans-stmt.c (compute_inner_temp_size): Don't perform bounds checking when calculating the bounds of scalarization. From-SVN: r115224 --- diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index e67b9bbc3dcf..38be155b6d10 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,9 @@ +2006-07-06 Francois-Xavier Coudert + + PR fortran/27874 + * trans-stmt.c (compute_inner_temp_size): Don't perform bounds + checking when calculating the bounds of scalarization. + 2006-07-05 Francois-Xavier Coudert PR fortran/20892 diff --git a/gcc/fortran/trans-stmt.c b/gcc/fortran/trans-stmt.c index 4e2f0fdfe2d0..a12316688cb9 100644 --- a/gcc/fortran/trans-stmt.c +++ b/gcc/fortran/trans-stmt.c @@ -1957,6 +1957,7 @@ compute_inner_temp_size (gfc_expr *expr1, gfc_expr *expr2, gfc_loopinfo loop; tree size; int i; + int save_flag; tree tmp; *lss = gfc_walk_expr (expr1); @@ -1989,7 +1990,10 @@ compute_inner_temp_size (gfc_expr *expr1, gfc_expr *expr2, loop.array_parameter = 1; /* Calculate the bounds of the scalarization. */ + save_flag = flag_bounds_check; + flag_bounds_check = 0; gfc_conv_ss_startstride (&loop); + flag_bounds_check = save_flag; gfc_conv_loop_setup (&loop); /* Figure out how many elements we need. */