From 3e14aaa2aa50a8ef28da096379f33e776c544d93 Mon Sep 17 00:00:00 2001 From: Bud Davis Date: Sat, 26 Jun 2004 11:49:06 +0000 Subject: re PR libfortran/16196 (gfortran fails to create file with OPEN(...,status='REPLACE')) 2004-06-26 Bud Davis PR gfortran/16196 * unix.c(regular_file): create file if it does not exist. * gfortran.fortran-torture/execute/open_replace.f90: New test case. From-SVN: r83709 --- libgfortran/io/unix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libgfortran/io/unix.c') diff --git a/libgfortran/io/unix.c b/libgfortran/io/unix.c index fc25395..0800447 100644 --- a/libgfortran/io/unix.c +++ b/libgfortran/io/unix.c @@ -982,7 +982,7 @@ regular_file (unit_action action, unit_status status) break; case STATUS_REPLACE: - mode |= O_TRUNC; + mode |= O_CREAT | O_TRUNC; break; default: -- cgit v1.1