summaryrefslogtreecommitdiff
path: root/libgfortran
diff options
context:
space:
mode:
authorJerry DeLisle <jvdelisle@gcc.gnu.org>2021-02-10 19:37:52 -0800
committerJerry DeLisle <jvdelisle@gcc.gnu.org>2021-02-10 19:37:52 -0800
commit19c023241020e3b6f5c38f47447bc0fcbe9fef5f (patch)
tree3119bcfc0481a888ff9c1cb6e1e4d18ccff50ca0 /libgfortran
parent27a804bc62805aedb1b097a00eb2c0059244680a (diff)
libgfortran: Fix unwanted end-of-record by checking if seen_dollar.
libgfortran/ChangeLog: PR libfortran/98825 * io/transfer.c (next_record_w): Insert check for seen_dollar and if so, skip issueing next record. gcc/testsuite/ChangeLog: PR libfortran/98825 * gfortran.dg/dollar_edit_descriptor_4.f: New test.
Diffstat (limited to 'libgfortran')
-rw-r--r--libgfortran/io/transfer.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libgfortran/io/transfer.c b/libgfortran/io/transfer.c
index 8ab0583dd55..27bee9d4e01 100644
--- a/libgfortran/io/transfer.c
+++ b/libgfortran/io/transfer.c
@@ -4020,6 +4020,8 @@ next_record_w (st_parameter_dt *dtp, int done)
}
}
}
+ else if (dtp->u.p.seen_dollar == 1)
+ break;
/* Handle legacy CARRIAGECONTROL line endings. */
else if (dtp->u.p.current_unit->flags.cc == CC_FORTRAN)
next_record_cc (dtp);