https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66936
kargl at gcc dot gnu.org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kargl at gcc dot gnu.org --- Comment #1 from kargl at gcc dot gnu.org --- (In reply to Keith Marshall from comment #0) > Created attachment 36013 [details] > Kludge to work around issue for mingw32 > > When building GCC, with FORTRAN language support, for mingw32 with the > mingwrt-3.21+ runtime library from MinGW.org installed, the build fails in > libgfortran/io/unix.c, because the tempfile_open() function gratuitously > assumes that, if HAVE_MKSTEMP is defined, then it must invoke: > > mode_mask = umask (S_IXUSR | S_IRWXG | S_IRWXO); > > regardless of whether or not those access mode flags are defined. Of > course, the assumption is invalid: while S_IXUSR may have some semblance of > meaning on a windows host, and is defined, S_IRWXG and S_IRWXO are > meaningless, and are not. > > Now, I can kludge around this, with the attached patch, but I suspect that > it doesn't represent a true solution. The name of the language is Fortran. The language has been called Fortran since 1988 or so. The correct fix would be to add test to configure to define HAVE_S_IRWXG and HAVE_S_IRWXO. A better fix would be for MingW32 to conform to POSIX.