This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/41678] Format label as second item in io control list is rejected
- From: "dominiq at lps dot ens dot fr" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 12 Oct 2009 12:46:34 -0000
- Subject: [Bug fortran/41678] Format label as second item in io control list is rejected
- References: <bug-41678-10743@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #3 from dominiq at lps dot ens dot fr 2009-10-12 12:46 -------
> In the original test case:
>
> real :: i
>
> The part that is rejected incorrectly is the format label.
I assumed i was an integer. F95 says:
Constraint: If the optional characters FMT= are omitted from the format
specifier, the format
specifier shall be the second item in the control information list and the
first item shall be
the unit specifier without the optional characters UNIT=.
The formulation of F2003/2008 is les explicit, but probably says the same
thing:
C918 (R913) If format appears without a preceding FMT=, it shall be the second
item in the io-control-spec-list and the first item shall be io-unit.
So I think gfortran is right to reject (unit=2, 100), it should be (2, 100) or
(unit=2, fmt=100).
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41678