From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20564 invoked by alias); 1 Apr 2008 11:47:49 -0000 Received: (qmail 20543 invoked by uid 22791); 1 Apr 2008 11:47:48 -0000 X-Spam-Check-By: sourceware.org Received: from mail1.physik.fu-berlin.de (HELO mail1.physik.fu-berlin.de) (160.45.35.12) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 01 Apr 2008 11:47:26 +0000 Received: from ith.physik.fu-berlin.de ([160.45.32.115] helo=[127.0.0.1]) by mail1.physik.fu-berlin.de with esmtp (Exim 4.63) (envelope-from ) id 1JgexU-0008NP-JA; Tue, 01 Apr 2008 13:47:23 +0200 Message-ID: <47F220C8.6000408@net-b.de> Date: Tue, 01 Apr 2008 11:47:00 -0000 From: Tobias Burnus User-Agent: Thunderbird 2.0.0.12 (X11/20071114) MIME-Version: 1.0 To: Jerry DeLisle CC: fortran@gcc.gnu.org, gcc-patches@gcc.gnu.org Subject: Re: [patch, fortran]PR25829 Add support for F2003 I/O features References: <20080329134426.GA15883@physik.fu-berlin.de> <1207024214.3325.26.camel@lenova.localdomain> In-Reply-To: <1207024214.3325.26.camel@lenova.localdomain> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-ZEDV-Virus-Scanned: No viruses found. [ClamAV 0.92/6525/Tue Apr 1 05:16:16 2008] X-ZEDV-Spam-Level: -- X-ZEDV-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on zs01.physik.fu-berlin.de X-ZEDV-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00 autolearn=ham version=3.2.3 X-ZEDV-Spam-Report: * -2.6 BAYES_00 BODY: Bayesian spam probability is 0 to 1% * [score: 0.0000] 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/msg00042.txt.bz2 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. * 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