This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/19777] -fbounds-check catches non-existent bounds violation
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 3 Jan 2006 18:36:02 -0000
- Subject: [Bug fortran/19777] -fbounds-check catches non-existent bounds violation
- References: <bug-19777-9410@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #6 from pinskia at gcc dot gnu dot org 2006-01-03 18:36 -------
Here is a newer patch which fixes it:
Index: trans-array.c
===================================================================
--- trans-array.c (revision 109225)
+++ trans-array.c (working copy)
@@ -1942,7 +1942,7 @@ gfc_conv_array_ref (gfc_se * se, gfc_arr
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;
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19777