Message ID | CAO9iq9HTu5QU_C=MmcB1HxQT6pRcfwR0iTMqN=we5Wt8LsF_nQ@mail.gmail.com |
---|---|
State | New |
Headers | show |
Janne Blomqvist <blomqvist.janne@gmail.com> writes: > PR libfortran/64770 > * gfortran.dg/open_new_segv.f90: New test. At line 9 of file /usr/local/gcc/gcc-20150125/gcc/testsuite/gfortran.dg/open_new_segv.f90 (unit = 99) Fortran runtime error: File 'pr64770test.dat' already exists FAIL: gfortran.dg/open_new_segv.f90 -O0 execution test Andreas.
diff --git a/libgfortran/io/unit.c b/libgfortran/io/unit.c index e168d32..687f507 100644 --- a/libgfortran/io/unit.c +++ b/libgfortran/io/unit.c @@ -829,7 +829,7 @@ filename_from_unit (int n) } /* Get the filename. */ - if (u != NULL) + if (u != NULL && u->filename != NULL) return strdup (u->filename); else return (char *) NULL;