https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66861
Janne Blomqvist <jb at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |WAITING Last reconfirmed| |2015-07-13 Ever confirmed|0 |1 --- Comment #2 from Janne Blomqvist <jb at gcc dot gnu.org> --- Hmm, does the following patch fix it? diff --git a/libgfortran/io/unix.c b/libgfortran/io/unix.c index e5fc6e1..0048e24 100644 --- a/libgfortran/io/unix.c +++ b/libgfortran/io/unix.c @@ -1570,7 +1570,7 @@ find_file0 (gfc_unit *u, FIND_FILE0_DECL) } else # endif - if (strcmp (u->filename, path) == 0) + if (u->filename && strcmp (u->filename, path) == 0) return u; #endif (Sorry, I don't have a windows machine to test on myself..)