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: unassig...@gcc.gnu.org ReportedBy: bur...@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.