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/27958] New: assignments to and from zero-sized string selections not handled


The following code is legal, but segfaults at runtime when compiled with
gfortran:

$ cat a.f90 
  character(len=10) :: s
  s = "abcdefghij"
  s(6:5) = s(7:5)
  print *, s
  end
$ ifort a.f90 -check all && ./a.out
 abcdefghij
$ gfortran a.f90 && ./a.out   
zsh: segmentation fault  ./a.out


-- 
           Summary: assignments to and from zero-sized string selections not
                    handled
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Keywords: wrong-code
          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=27958


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