public inbox for gcc-prs@sourceware.org help / color / mirror / Atom feed
From: Tim Prince <timothyprince@sbcglobal.net> To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, Subject: Re: fortran/10197: direct acces files not unformatted by default Date: Mon, 24 Mar 2003 14:26:00 -0000 [thread overview] Message-ID: <20030324141601.21555.qmail@sources.redhat.com> (raw) The following reply was made to PR fortran/10197; it has been noted by GNATS. From: Tim Prince <timothyprince@sbcglobal.net> To: bdavis9659@comcast.net, gcc-gnats@gcc.gnu.org Cc: Subject: Re: fortran/10197: direct acces files not unformatted by default Date: Mon, 24 Mar 2003 06:15:26 -0800 On Sunday 23 March 2003 16:34, bdavis9659@comcast.net wrote: > >Number: 10197 > >Category: fortran > >Synopsis: direct acces files not unformatted by default > OPEN(..ACCESS='DIRECT'..) should open a file with FORM='UNFORMATTED'. > > It is being opened with FORM='FORMATTED', which causes a runtime error on > the first unformatted I/O. > > This is correct on g77 2.96, and not on the pre-release g77 3.3 or g77 3.4. > > At the risk of being proven wrong by a plethora of language lawyers:):) > > The FORTAN-77 standard, section 12.10.1 states; when discussing FORM= > > "If this specifier is omitted, a value of UNFORMATTED is assumed if the > file is being connected for direct access, and a value of FORMATTED is > assumed if the file is being connected for sequential access. " > > So, IMHO, this is how it should work. > > >How-To-Repeat: > > C demonstrate a direct access file is by default unformatted > IMPLICIT NONE > LOGICAL*4 ERROR /.FALSE./ > CHARACTER*12 FORM > DATA FORM / '' / > OPEN(UNIT=60, > 1 ACCESS='DIRECT', > 2 STATUS='SCRATCH', > 3 RECL=255) > INQUIRE(UNIT=60,FORM=FORM) > IF (FORM.EQ.'UNFORMATTED') THEN > PRINT*,'FORM IS ',FORM,' WHICH IS CORRECT.' > ELSE > PRINT*,'FORM IS ',FORM,' S/B UNFORMATTED.' > ERROR = .TRUE. > ENDIF > CLOSE(UNIT=60) > IF (ERROR) CALL ABORT > END > I "sent mail to interested parties," but, AFAICT, all the interested parties selected by gnats-web bounced my mail. I pointed out that the version of open.c included in gcc-3.2.2 implements the standard, in accordance with Bud's test. I rebuilt gcc-3.3 with that version of open.c, and it passed Bud's test. So, gcc-3.3 has a regression from gcc-3.2.2, apparently caused by an out of date libf2c. -- Tim Prince
next reply other threads:[~2003-03-24 14:16 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2003-03-24 14:26 Tim Prince [this message] -- strict thread matches above, loose matches on Subject: below -- 2003-03-25 8:56 toon 2003-03-24 2:56 bdavis9659
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20030324141601.21555.qmail@sources.redhat.com \ --to=timothyprince@sbcglobal.net \ --cc=gcc-prs@gcc.gnu.org \ --cc=nobody@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).