This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/34424] New: Internal file forbidden as I/O list item
- 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: 10 Dec 2007 18:28:43 -0000
- Subject: [Bug fortran/34424] New: Internal file forbidden as I/O list item
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
The following code is invalid (from comp.lang.fortran):
character(len=16) :: strtofind !String one is looking for
strtofind = "1 "
write(strtofind,'(A1,A,A1)') ',',trim(adjustl(strtofind)),','
print *, "|", strtofind , "|"
end
9.4.4.4 Data Transfer (in F95) says "If an internal file has been specified, an
input/output list item shall not be in the file or associated with the file."
This is basically equivalent to:
character(len=10) :: s
write(s,'(A)') s
end
--
Summary: Internal file forbidden as I/O list item
Product: gcc
Version: unknown
Status: UNCONFIRMED
Keywords: accepts-invalid, diagnostic
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: fxcoudert at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34424