summaryrefslogtreecommitdiff
path: root/libgfortran/io/inquire.c
diff options
context:
space:
mode:
Diffstat (limited to 'libgfortran/io/inquire.c')
-rw-r--r--libgfortran/io/inquire.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libgfortran/io/inquire.c b/libgfortran/io/inquire.c
index fb525caf863..a5423346db9 100644
--- a/libgfortran/io/inquire.c
+++ b/libgfortran/io/inquire.c
@@ -409,7 +409,10 @@ inquire_via_unit (st_parameter_inquire *iqp, gfc_unit * u)
if (u == NULL)
*iqp->size = -1;
else
- *iqp->size = file_size (u->file, (gfc_charlen_type) u->file_len);
+ {
+ sflush (u->s);
+ *iqp->size = ssize (u->s);
+ }
}
}