[Bug fortran/30655] New: Undue out-of-bounds warning

fxcoudert at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Wed Jan 31 14:18:00 GMT 2007


gfortran should not report an out-of-bounds access on the following code:

$ cat a.f90
  integer i(12), j
  j = -1
  i(0:j) = 42
  end
$ gfortran a.f90                       
a.f90:3.4:

  i(0:j) = 42
   1
Warning: Array reference at (1) is out of bounds


Compiling with -fbounds-check and running it doesn't error, which means the
-fbounds-check code is generated fine. But, somewhere, the front-end is
over-zealous (it doesn't know about stride). I thought I had that fixed at some
point...


-- 
           Summary: Undue out-of-bounds warning
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Keywords: diagnostic
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: fxcoudert at gcc dot gnu dot org
OtherBugsDependingO 27766
             nThis:


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30655



More information about the Gcc-bugs mailing list