public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "tobias dot burnus at physik dot fu-berlin dot de" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/28335] New: flush() / write() statement on closed units - error? Date: Tue, 11 Jul 2006 09:04:00 -0000 [thread overview] Message-ID: <bug-28335-1719@http.gcc.gnu.org/bugzilla/> (raw) The Fortran 2003 standard declares: "Every input/output statement except an OPEN, CLOSE, INQUIRE, or WAIT statement shall refer to a unit that is connected to a file" gfortran does not give a run-time error. However, I don't know whether one should enforce the standard (and thus do this check). program test write(*,*) 'Hello' flush(6) ! preconnected unit (stdout) flush(99)! preconnected unit ! flush() ! invalid close(88) ! close preconnected unit <<<<<<<< close(88) ! close once more ! wait(88) ! not supported by gfortran flush(88) ! invalid <<<<<<<<<<<<< write(88,*) 'This should also produce an error' !<<<<<< end program test Expected: Like NAG f95 (or g95) Hello Unit 88 is not connected Program terminated by fatal I/O error In TEST, line 9 of flush.f90 -- Summary: flush() / write() statement on closed units - error? Product: gcc Version: 4.2.0 Status: UNCONFIRMED Severity: minor Priority: P3 Component: fortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: tobias dot burnus at physik dot fu-berlin dot de http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28335
next reply other threads:[~2006-07-11 9:04 UTC|newest] Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top 2006-07-11 9:04 tobias dot burnus at physik dot fu-berlin dot de [this message] 2006-07-18 10:47 ` [Bug fortran/28335] " fxcoudert at gcc dot gnu dot org 2006-07-25 5:10 ` patchapp at dberlin dot org 2006-07-26 1:47 ` jvdelisle at gcc dot gnu dot org 2006-07-26 1:51 ` jvdelisle at gcc dot gnu dot org 2006-07-26 6:23 ` [Bug fortran/28335] [4.1 only] " fxcoudert at gcc dot gnu dot org 2006-07-27 1:01 ` jvdelisle at gcc dot gnu dot org 2006-07-27 5:13 ` jvdelisle at gcc dot gnu dot org 2006-07-27 5:14 ` jvdelisle at gcc dot gnu dot org 2006-07-30 23:12 ` steven at gcc dot gnu dot org 2006-07-30 23:13 ` steven at gcc dot gnu dot org 2006-07-30 23:15 ` [Bug fortran/28335] [4.2 Regression] " steven at gcc dot gnu dot org 2006-07-31 0:09 ` jvdelisle at gcc dot gnu dot org 2006-07-31 0:15 ` jvdelisle at gcc dot gnu dot org 2006-07-31 1:32 ` jvdelisle at gcc dot gnu dot org 2006-07-31 1:36 ` jvdelisle at gcc dot gnu dot org 2006-07-31 1:57 ` jvdelisle at gcc dot gnu dot org 2006-07-31 2:02 ` jvdelisle at gcc dot gnu dot org
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=bug-28335-1719@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@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).