aboutsummaryrefslogtreecommitdiff
path: root/libgfortran/io/file_pos.c
diff options
context:
space:
mode:
authorFrancois-Xavier Coudert <fxcoudert@gcc.gnu.org>2021-12-16 15:33:17 +0100
committerFrançois-Xavier Coudert <fxcoudert@gcc.gnu.org>2021-12-16 17:46:28 +0100
commitc14f38d4292ec22462a4080841d526f87428130a (patch)
treeb8381f8fd9f6a968bd2d4f181be97af81739c761 /libgfortran/io/file_pos.c
parent3f624a624a137860e080fc959d7467a76aab263d (diff)
downloadgcc-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.c2
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)