Commit 7936f3e3 by Francois-Xavier Coudert Committed by François-Xavier Coudert

re PR fortran/19777 (-fbounds-check catches non-existent bounds violation)

	PR fortran/19777

	* trans-array.c (gfc_conv_array_ref): Don't perform out-of-bounds
	checking for assumed-size arrrays.

	* gfortran.dg/bounds_check_2.f: New test.

From-SVN: r114153
parent 59c0928b
2006-05-27 Francois-Xavier Coudert <coudert@clipper.ens.fr>
PR fortran/19777
* trans-array.c (gfc_conv_array_ref): Don't perform out-of-bounds
checking for assumed-size arrrays.
2006-05-27 Paul Thomas <pault@gcc.gnu.org>
* trans-intrinsic.c (gfc_conv_associated): If pointer in first
......
......@@ -1948,7 +1948,7 @@ gfc_conv_array_ref (gfc_se * se, gfc_array_ref * ar)
gfc_conv_expr_type (&indexse, ar->start[n], gfc_array_index_type);
gfc_add_block_to_block (&se->pre, &indexse.pre);
if (flag_bounds_check)
if (flag_bounds_check && ar->as->type != AS_ASSUMED_SIZE)
{
/* Check array bounds. */
tree cond;
......
2006-05-27 Francois-Xavier Coudert <coudert@clipper.ens.fr>
PR fortran/19777
* gfortran.dg/bounds_check_2.f: New test.
2006-05-27 Janne Blomqvist <jb@gcc.gnu.org>
* gfortran.dg/hollerith_f95.f90: Add -fall-intrinsics.
! { dg-do run }
! { dg-options "-fbounds-check" }
! PR fortran/19777
implicit none
integer npts
parameter (npts=10)
double precision v(npts)
external init1
call init1 (npts, v)
end
subroutine init1 (npts, v)
implicit none
integer npts
double precision v(*)
integer i
do 10 i = 1, npts
v(i) = 0
10 continue
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