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/30655] New: Undue out-of-bounds warning


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


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