http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36755
Tobias Burnus <burnus at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED AssignedTo|unassigned at gcc dot |burnus at gcc dot gnu.org |gnu.org | --- Comment #9 from Tobias Burnus <burnus at gcc dot gnu.org> 2012-01-12 19:25:31 UTC --- (In reply to comment #8) > It honors the "umask", allows for fancy combinations such as > "g+w-r,a+x,-w,o=u,u+s,+t". Seemingly, I misread POSIX: For my program o=u sets "other" to the original permissions. By contrast, GNU chmod sets it to the last permission. For: umask 022; mkdir foo; chmod g+w-r,a+x,-w,o=u foo the difference is whether other is r-x or rwx. In the code: Simply replace "old_mode" by "file_mode". I have meanwhile also converted the fixed program into a libgfortran patch: http://gcc.gnu.org/ml/fortran/2012-01/msg00126.html