[patch, fortran]PR25829 Add support for F2003 I/O features

Jerry DeLisle jvdelisle@verizon.net
Tue Apr 1 14:15:00 GMT 2008


On Tue, 2008-04-01 at 13:47 +0200, Tobias Burnus wrote: 
> Jerry DeLisle wrote:
> > The attached updated patch incorporates all constraints and checks
> > listed above in the front end.  It also implements the DP and DC format
> > specifiers.
> >   
> Thanks. Some more issues and remarks. I will try to review the patch later.
> 
OK, I will work through these.

Thanks for continued review.

Jerry 
> * There should be a "Fortran 2003:" in the error message.
> +         if (gfc_notify_std (GFC_STD_F2003, "DP format specifier not 
> allowed "
> 
> 
> * decimal= in INQUIRE does not seem to be supported:
>   inquire(unit=99, decimal=d)
> Same for:
>   inquire(99,encoding=str)
> I also think the error messages can be improved:
>   inquire(99, BLANK='foo')
>             1
>   Error: Syntax error in INQUIRE statement at (1)
> NAG has a better error message: "Item for i/o keyword BLANK is not a 
> variable"
> 
> 
> * write(99,decimal=foo) 4.4, 3.3
> This gives a run-time error message, but it can be detected at compile 
> time. NAG f95 has:
>    Error: DECIMAL= is incompatible with unformatted i/o
> Actually, the run-time error message is also a bit misleading:
>    Fortran runtime error: Missing format for FORMATTED data transfer
> 
> 
> * Analogously for the following:
>   write(99,DELIM=str)
> which is also not allowed  for unformatted I/O
> 
> 
> * "Error: F2003 Feature: SIGN=specifier at (1) not implemented"
> Can you add a space after the "=" sign?
> 
> * write(99,id=id)
> This is invalid as asynchronous="yes" needs to be specified as well. 
> However, this is not enforced in the front end (or library).
> 
> * The following program crashes in _gfortran_st_wait (transfer.c:2966) 
> ("Invalid write of size 4"):
>   integer :: id
>   open(99, asynchronous='yes')
>   write(99,asynchronous='yes',id=id,fmt=*)
>   wait(99,id=id)
>   end
> 
> * The following program is invalid, but only detectable at run time. 
> Should there be a run-time check? Maybe one should postpone this until 
> the real asynchronous is available:
>   integer :: id
>   open(99, asynchronous='no')
>   write(99,asynchronous='yes',id=id,fmt=*)
>   end
> But I think we need such a check for the real implementation.
> 
> I played a bit around with the decimal comma support and it nicely works :-)
> 
> Tobias



More information about the Gcc-patches mailing list