aboutsummaryrefslogtreecommitdiff
path: root/libgfortran/io
diff options
context:
space:
mode:
authorJerry DeLisle <jvdelisle@gcc.gnu.org>2018-02-18 15:32:39 +0000
committerJerry DeLisle <jvdelisle@gcc.gnu.org>2018-02-18 15:32:39 +0000
commitd5efbf3fd5e1b872524dfa2439e5163decf1614f (patch)
treec964e1236096628ad7e54d9596ccc526e960313f /libgfortran/io
parent9bbbdb49b4f8b0657893acc8f23ca952745d93ae (diff)
downloadgcc-d5efbf3fd5e1b872524dfa2439e5163decf1614f.zip
gcc-d5efbf3fd5e1b872524dfa2439e5163decf1614f.tar.gz
gcc-d5efbf3fd5e1b872524dfa2439e5163decf1614f.tar.bz2
re PR fortran/84412 (Erroneous "Inquire statement identifies an internal file" error)
2018-02-18 Jerry DeLisle <jvdelisle@gcc.gnu.org> PR libgfortran/84412 * io/transfer.c (finalize_transfer): After completng an internal unit I/O operation, clear internal_unit_kind. From-SVN: r257791
Diffstat (limited to 'libgfortran/io')
-rw-r--r--libgfortran/io/transfer.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libgfortran/io/transfer.c b/libgfortran/io/transfer.c
index 8bc828c..df33bed 100644
--- a/libgfortran/io/transfer.c
+++ b/libgfortran/io/transfer.c
@@ -3993,6 +3993,10 @@ finalize_transfer (st_parameter_dt *dtp)
if (dtp->u.p.unit_is_internal)
{
+ /* The unit structure may be reused later so clear the
+ internal unit kind. */
+ dtp->u.p.current_unit->internal_unit_kind = 0;
+
fbuf_destroy (dtp->u.p.current_unit);
if (dtp->u.p.current_unit
&& (dtp->u.p.current_unit->child_dtio == 0)