This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/33268] read ('(f3.3)'), a rejected due to the extra (...)
- From: "burnus at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 31 Aug 2007 20:16:03 -0000
- Subject: [Bug fortran/33268] read ('(f3.3)'), a rejected due to the extra (...)
- References: <bug-33268-13404@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #2 from burnus at gcc dot gnu dot org 2007-08-31 20:16 -------
> The print case is rejected at run time.
My bad. I wanted to write:
print('(a)'), 'Hello'
which is valid code and accepted. (Cf. PR33269 for detecting this.)
> read ('(f3.3)'), a ! Invalid, rejected at compile time, requires unit number.
I disagree - and also NAG f95 agrees with me; READ has two form:
R910 read-stmt is READ ( io-control-spec-list ) [ input-item-list ]
or READ format [ , input-item-list ]
And I would argue that "read '(f3.3)', a" and "read ('(f3.3)'), a" are both of
the second type. As both are default-character-expressions, this should be
valid. As is my - fixed - PRINT case.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33268