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

            Bug ID: 70058
           Summary: Segmentation fault when open file with existing file
                    and status = "UNKNOWN"
           Product: gcc
           Version: 5.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ranftmaps at hotmail dot com
  Target Milestone: ---

For the Windows 64 bit gfortran version 5.1.0, a segmentation fault will occur
if the open statement with status = 'UNKNOWN' is used when the file exists.  
Earlier versions of gfortran (such as 4.6.2) do not have this issue.  Example
code is as follows:

       OPEN(UNIT=5,FILE='exists.txt',STATUS='UNKNOWN')
       CLOSE(UNIT=5,STATUS='KEEP')
       STOP 'NORMAL TERMINATION'
       END 

gfortran version information is as follows:

C:\TDM-GCC-64\bin>gfortran -v
Using built-in specs.
COLLECT_GCC=gfortran
COLLECT_LTO_WRAPPER=C:/TDM-GCC-64/bin/../libexec/gcc/x86_64-w64-mingw32/5.1.0/lto-wrapper.exe
Target: x86_64-w64-mingw32
Configured with: ../../../src/gcc-5.1.0/configure --build=x86_64-w64-mingw32
--enable-targets=all --enable-languages=ada,c,c++,fortran,lto,objc,obj-c++
--enable-libgomp --enable-lto --enable-graphite
--enable-cxx-flags=-DWINPTHREAD_STATIC --disable-build-with-cxx
--disable-build-poststage1-with-cxx --enable-libstdcxx-debug
--enable-threads=posix --enable-version-specific-runtime-libs
--enable-fully-dynamic-string --enable-libstdcxx-threads
--enable-libstdcxx-time --with-gnu-ld --disable-werror --disable-nls
--disable-win32-registry --prefix=/mingw64tdm --with-local-prefix=/mingw64tdm
--with-pkgversion=tdm64-1 --with-bugurl=http://tdm-gcc.tdragon.net/bugs
Thread model: posix
gcc version 5.1.0 (tdm64-1)

Reply via email to