This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/19777] -fbounds-check catches non-existent bounds violation



------- 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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]