This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/27958] New: assignments to and from zero-sized string selections not handled
- From: "fxcoudert at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 8 Jun 2006 13:28:06 -0000
- Subject: [Bug fortran/27958] New: assignments to and from zero-sized string selections not handled
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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