diff options
author | Bud Davis <bdavis9659@comcast.net> | 2004-06-26 11:49:06 +0000 |
---|---|---|
committer | Bud Davis <bdavis@gcc.gnu.org> | 2004-06-26 11:49:06 +0000 |
commit | 3e14aaa2aa50a8ef28da096379f33e776c544d93 (patch) | |
tree | 262b089154ec0846ce107db6a572f974bf45ae1e /libgfortran/io/unix.c | |
parent | 0ff0dfbf18bc964cf71b64dc6f1f1298bea12d04 (diff) | |
download | gcc-3e14aaa2aa50a8ef28da096379f33e776c544d93.zip gcc-3e14aaa2aa50a8ef28da096379f33e776c544d93.tar.gz gcc-3e14aaa2aa50a8ef28da096379f33e776c544d93.tar.bz2 |
re PR libfortran/16196 (gfortran fails to create file with OPEN(...,status='REPLACE'))
2004-06-26 Bud Davis <bdavis9659@comcast.net>
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
Diffstat (limited to 'libgfortran/io/unix.c')
-rw-r--r-- | libgfortran/io/unix.c | 2 |
1 files changed, 1 insertions, 1 deletions
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: |