public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/67367] New: Program crashes on READ(IOSTAT=IOS, ...) on directory OPEN()ed without error
@ 2015-08-27  2:54 urbanjost at comcast dot net
  2015-08-27  4:18 ` [Bug fortran/67367] " jvdelisle at gcc dot gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: urbanjost at comcast dot net @ 2015-08-27  2:54 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67367

            Bug ID: 67367
           Summary: Program crashes on READ(IOSTAT=IOS, ...) on directory
                    OPEN()ed without error
           Product: gcc
           Version: 4.9.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: urbanjost at comcast dot net
  Target Milestone: ---

Created attachment 36257
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=36257&action=edit
commands and their output show system type, compiler version, source code and
saved temp files

When I read a list of filenames from the command line the list can easily
contain non-standard-file names such as directories. If I OPEN() a name that is
a directory with default options I get an error on the OPEN() (IOSTAT=21) and
IOMSG reports "file is a directory". But I am opening the files as read-only
streams. With those options the OPEN() gives no errors. But the first READ() of
the files causes the program to halt abruptly with no messages. No core file is
produced; I/O on open files is not flushed or closed properly.

I would have expected the OPEN() to have failed with an error; or if it is
legal to open a directory as a stream (which would be useful but surprising) I
would expect the READ to have trapped the error as the READ() uses IOSTAT=.


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2015-08-31  0:14 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-27  2:54 [Bug fortran/67367] New: Program crashes on READ(IOSTAT=IOS, ...) on directory OPEN()ed without error urbanjost at comcast dot net
2015-08-27  4:18 ` [Bug fortran/67367] " jvdelisle at gcc dot gnu.org
2015-08-28 18:58 ` jvdelisle at gcc dot gnu.org
2015-08-28 22:05 ` sgk at troutmask dot apl.washington.edu
2015-08-29  0:16 ` jvdelisle at gcc dot gnu.org
2015-08-29 15:39 ` jvdelisle at gcc dot gnu.org
2015-08-29 15:53 ` jvdelisle at gcc dot gnu.org
2015-08-31  0:14 ` jvdelisle at gcc dot gnu.org

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).