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/28081] New: Undue compile-time error for zero-sized substring


The following error should not happen:

$ cat substr_3.f 
      implicit none
      character(len=10) :: s, t
      integer :: i, j

      s = "abcdefghij"
      t(:10) = s(1:)
      s(16:15) = "foo"
      if (s /= t) call abort
      end
$ gfortran substr_3.f
 In file substr_3.f:9

      s(16:15) = "foo"                                                  
       1
Error: Substring end index at (1) is out of bounds


-- 
           Summary: Undue compile-time error for zero-sized substring
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Keywords: rejects-valid
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: fxcoudert at gcc dot gnu dot org
        ReportedBy: fxcoudert at gcc dot gnu dot org


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


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