This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/52335] New: [4.4/4.5/4.6/4.7 Regression] I/O: -std=f95 rejects valid DELIM= in OPEN
- From: "burnus at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 22 Feb 2012 07:05:16 +0000
- Subject: [Bug fortran/52335] New: [4.4/4.5/4.6/4.7 Regression] I/O: -std=f95 rejects valid DELIM= in OPEN
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52335
Bug #: 52335
Summary: [4.4/4.5/4.6/4.7 Regression] I/O: -std=f95 rejects
valid DELIM= in OPEN
Classification: Unclassified
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Keywords: rejects-valid
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: burnus@gcc.gnu.org
http://groups.google.com/group/comp.lang.fortran/browse_thread/thread/9942915c9c41b151
open(unit=lunnml,file=nmlfile,delim='apostrophe',status='old')
1
Error: Fortran 2003: DELIM= at (1) not allowed in Fortran 95
However, Fortran 95 has:
R904 open-stmt is OPEN ( connect-spec-list )
R905 connect-spec is ...
or DELIM = scalar-default-char-expr
and
"9.3.4.9 DELIM= specifier in the OPEN statement
The scalar-default-char-expr shall evaluate to APOSTROPHE, QUOTE, or NONE.
[...]"
Note: gfortran correctly allows:
inquire(nunit, delim=str)
I think the bogus check has been introduced when Fortran 2003's
"9.5.1.7 DELIM= specifier in a data transfer statement"
was implemented.
The reason seems to be that OPEN and data-transfer (READ/WRITE) share the
"delim=" checking.