http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59108
Jerry DeLisle <jvdelisle at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jvdelisle at gcc dot gnu.org Assignee|unassigned at gcc dot gnu.org |jvdelisle at gcc dot gnu.org --- Comment #1 from Jerry DeLisle <jvdelisle at gcc dot gnu.org> --- Proposed patch, testing: Index: unix.c =================================================================== --- unix.c (revision 204616) +++ unix.c (working copy) @@ -1305,6 +1305,10 @@ break; case STATUS_UNKNOWN: + crflag = 0; + if (flags->action == ACTION_READ) + break; + /* Fall through. */ case STATUS_SCRATCH: crflag = O_CREAT; break;