public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/67063] New: segfault in opening a formatted file at second time with status="replace"
@ 2015-07-30  1:36 textdirected at gmail dot com
  2015-07-30  9:14 ` [Bug fortran/67063] " dominiq at lps dot ens.fr
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: textdirected at gmail dot com @ 2015-07-30  1:36 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 67063
           Summary: segfault in opening a formatted file at second time
                    with status="replace"
           Product: gcc
           Version: 5.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: textdirected at gmail dot com
  Target Milestone: ---

I encountered a segfault bug in opening a formatted file at second time with
status="replace". I am using gfortran prebuilt binary of mingw64 on Windows 8.1
Pro.

For a simple program,


program gfortran51_open_bug
open(17,file='mydata.dat', status='replace')
write (17,*) 100, 200, 300
close(17)
write(*,*) "mydata.dat written first."
open(18,file='mydata.dat', status='replace')
write (18,*) -100, -200, -300
close(18)
write(*,*) "mydata.dat written second."
end program gfortran51_open_bug


My encountered bug is as follows:

PS E:\tmp> gfortran gfortran51_open_bug.f90
PS E:\tmp> .\a.exe
 mydata.dat written first.

Program received signal SIGSEGV: Segmentation fault - invalid memory reference.

Backtrace for this error:
#0  ffffffffffffffff
#1  ffffffffffffffff
#2  ffffffffffffffff
#3  ffffffffffffffff
#4  ffffffffffffffff
#5  ffffffffffffffff
#6  ffffffffffffffff
#7  ffffffffffffffff
#8  ffffffffffffffff
#9  ffffffffffffffff
#10  ffffffffffffffff
#11  ffffffffffffffff
#12  ffffffffffffffff
#13  ffffffffffffffff
#14  ffffffffffffffff
#15  ffffffffffffffff
#16  ffffffffffffffff
#17  ffffffffffffffff
#18  ffffffffffffffff


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

end of thread, other threads:[~2015-08-08 20:25 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-30  1:36 [Bug fortran/67063] New: segfault in opening a formatted file at second time with status="replace" textdirected at gmail dot com
2015-07-30  9:14 ` [Bug fortran/67063] " dominiq at lps dot ens.fr
2015-07-31  0:24 ` textdirected at gmail dot com
2015-08-03 21:38 ` fxcoudert at gcc dot gnu.org
2015-08-04  6:59 ` textdirected at gmail dot com
2015-08-04 17:43 ` ismail at donmez dot ws
2015-08-05  3:37 ` textdirected at gmail dot com
2015-08-08 20:25 ` fxcoudert 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).