summaryrefslogtreecommitdiff
path: root/libgfortran
diff options
context:
space:
mode:
authorBud Davis <bdavis9659@comcast.net>2004-12-24 00:29:07 +0000
committerBud Davis <bdavis@gcc.gnu.org>2004-12-24 00:29:07 +0000
commit5d3a9816945662618f64a6dba1660f95586e515a (patch)
treedc614320959253fb4d1b9ce0d541eb3e51d1031b /libgfortran
parent4a9dd33d4b135f24e6e54ff81653e0986bb2bfff (diff)
downloadgcc-5d3a9816945662618f64a6dba1660f95586e515a.tar.gz
re PR libfortran/19071 (complex formatted output has too many items)
2004-12-23 Bud Davis <bdavis9659@comcast.net> PR fortran/19071 * io/tranfer.c (formatted_transfer): moved check for format reversion inside the processing loop. * gfortran.dg/complex_write.f90: New test. From-SVN: r92582
Diffstat (limited to 'libgfortran')
-rw-r--r--libgfortran/ChangeLog6
-rw-r--r--libgfortran/io/transfer.c16
2 files changed, 14 insertions, 8 deletions
diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog
index 452bb4aa76c..749f5a3edbe 100644
--- a/libgfortran/ChangeLog
+++ b/libgfortran/ChangeLog
@@ -1,3 +1,9 @@
+2004-12-23 Bud Davis <bdavis9659@comcast.net>
+
+ PR fortran/19071
+ * io/tranfer.c (formatted_transfer): moved check for
+ format reversion inside the processing loop.
+
2004-12-19 Aaron W. LaFramboise <aaronavay62@aaronwl.com>
PR libfortran/19074
diff --git a/libgfortran/io/transfer.c b/libgfortran/io/transfer.c
index c3daa21bfac..fb673042432 100644
--- a/libgfortran/io/transfer.c
+++ b/libgfortran/io/transfer.c
@@ -425,16 +425,16 @@ formatted_transfer (bt type, void *p, int len)
if (type == BT_COMPLEX)
type = BT_REAL;
- /* If reversion has occurred and there is another real data item,
- then we have to move to the next record. */
-
- if (g.reversion_flag && n > 0)
- {
- g.reversion_flag = 0;
- next_record (0);
- }
for (;;)
{
+ /* If reversion has occurred and there is another real data item,
+ then we have to move to the next record. */
+ if (g.reversion_flag && n > 0)
+ {
+ g.reversion_flag = 0;
+ next_record (0);
+ }
+
consume_data_flag = 1 ;
if (ioparm.library_return != LIBRARY_OK)
break;