This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/41678] Format label as second item in io control list is rejected



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]