From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21363 invoked by alias); 1 Apr 2008 14:15:24 -0000 Received: (qmail 21302 invoked by uid 22791); 1 Apr 2008 14:15:22 -0000 X-Spam-Check-By: sourceware.org Received: from vms044pub.verizon.net (HELO vms044pub.verizon.net) (206.46.252.44) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 01 Apr 2008 14:15:00 +0000 Received: from [192.168.1.5] ([71.120.231.15]) by vms044.mailsrvcs.net (Sun Java System Messaging Server 6.2-6.01 (built Apr 3 2006)) with ESMTPA id <0JYN008UMGW0DK74@vms044.mailsrvcs.net>; Tue, 01 Apr 2008 09:14:26 -0500 (CDT) Date: Tue, 01 Apr 2008 14:15:00 -0000 From: Jerry DeLisle Subject: Re: [patch, fortran]PR25829 Add support for F2003 I/O features In-reply-to: <47F220C8.6000408@net-b.de> To: Tobias Burnus Cc: fortran@gcc.gnu.org, gcc-patches@gcc.gnu.org Message-id: <1207058497.3089.9.camel@lenova.localdomain> MIME-version: 1.0 X-Mailer: Evolution 2.12.3 (2.12.3-3.fc8) Content-type: text/plain Content-transfer-encoding: 7bit References: <20080329134426.GA15883@physik.fu-berlin.de> <1207024214.3325.26.camel@lenova.localdomain> <47F220C8.6000408@net-b.de> Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2008-04/txt/msg00065.txt.bz2 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. The checks in place now are for EXPR_CONSTANT and not addressing the broader case. 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