This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/30626] New: Wrong-code for internal read
- 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: 29 Jan 2007 09:07:38 -0000
- Subject: [Bug fortran/30626] New: Wrong-code for internal read
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Ante-scriptum: This PR might be related to PR30284 (or not).
$ cat a.f90
character(len=12) :: date(1) = (/ '200612231200' /)
integer :: foo
read (date(:)(1:4),'(i4)') foo
print *, foo
end
$ ifort a.f90 && ./a.out
2006
$ gfortran a.f90 && ./a.out
2
gfortran has an incorrect behaviour here, while ifort is doing the right thing
(like all other compilers I could test).
--
Summary: Wrong-code for internal read
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Keywords: wrong-code
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: fxcoudert at gcc dot gnu dot org
BugsThisDependsOn: 30284
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30626