diff options
author | Francois-Xavier Coudert <fxcoudert@gcc.gnu.org> | 2021-12-16 15:33:17 +0100 |
---|---|---|
committer | François-Xavier Coudert <fxcoudert@gcc.gnu.org> | 2021-12-16 17:46:28 +0100 |
commit | c14f38d4292ec22462a4080841d526f87428130a (patch) | |
tree | b8381f8fd9f6a968bd2d4f181be97af81739c761 /libgfortran/io/file_pos.c | |
parent | 3f624a624a137860e080fc959d7467a76aab263d (diff) | |
download | gcc-c14f38d4292ec22462a4080841d526f87428130a.zip gcc-c14f38d4292ec22462a4080841d526f87428130a.tar.gz gcc-c14f38d4292ec22462a4080841d526f87428130a.tar.bz2 |
Fix FLUSH IOSTAT value
PR libfortran/101255
libgfortran/ChangeLog:
* io/file_pos.c: Fix error code.
gcc/testsuite/ChangeLog:
* gfortran.dg/iostat_5.f90: New file.
Diffstat (limited to 'libgfortran/io/file_pos.c')
-rw-r--r-- | libgfortran/io/file_pos.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libgfortran/io/file_pos.c b/libgfortran/io/file_pos.c index 7e71ca5..4ed1698 100644 --- a/libgfortran/io/file_pos.c +++ b/libgfortran/io/file_pos.c @@ -527,7 +527,7 @@ st_flush (st_parameter_filepos *fpp) } else /* FLUSH on unconnected unit is illegal: F95 std., 9.3.5. */ - generate_error (&fpp->common, LIBERROR_BAD_OPTION, + generate_error (&fpp->common, -LIBERROR_BAD_UNIT, "Specified UNIT in FLUSH is not connected"); if (needs_unlock) |