* 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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@114153
138bc75d-0d04-0410-961f-
82ee72b054a4
+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
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.
--- /dev/null
+! { 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