diff options
author | fxcoudert <fxcoudert@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-05-29 12:22:49 +0000 |
---|---|---|
committer | fxcoudert <fxcoudert@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-05-29 12:22:49 +0000 |
commit | 7cc5fadbca6bf248a87f6ac4025e3caa91ea71d8 (patch) | |
tree | d80d5771a74496d12a3ce051f6bbac51455b8a76 /libgfortran/io | |
parent | 88731f86fb799d37d92fae26e6fe07d8818f29f6 (diff) | |
download | gcc-7cc5fadbca6bf248a87f6ac4025e3caa91ea71d8.tar.gz |
PR libfortran/20006
* io.c (format_item_1): Add check and extension warning for
$ edit descriptor.
* io/format.c (parse_format_list): Set repeat count of $ format
node to 1.
* io/transfer.c (read_sf): Add g.seen_dollar to the test
concerning advancing I/O.
(data_transfer_init): Likewise.
(finalize_transfer): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@100314 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgfortran/io')
-rw-r--r-- | libgfortran/io/format.c | 1 | ||||
-rw-r--r-- | libgfortran/io/transfer.c | 7 |
2 files changed, 5 insertions, 3 deletions
diff --git a/libgfortran/io/format.c b/libgfortran/io/format.c index 413a664542d..229a937b05b 100644 --- a/libgfortran/io/format.c +++ b/libgfortran/io/format.c @@ -579,6 +579,7 @@ parse_format_list (void) case FMT_DOLLAR: get_fnode (&head, &tail, FMT_DOLLAR); + tail->repeat = 1; goto between_desc; case FMT_T: diff --git a/libgfortran/io/transfer.c b/libgfortran/io/transfer.c index b51da52204e..46bec834a27 100644 --- a/libgfortran/io/transfer.c +++ b/libgfortran/io/transfer.c @@ -191,7 +191,7 @@ read_sf (int *length) /* If we see an EOR during non-advancing I/O, we need to skip the rest of the I/O statement. Set the corresponding flag. */ - if (advance_status == ADVANCE_NO) + if (advance_status == ADVANCE_NO || g.seen_dollar) eor_condition = 1; /* Without padding, terminate the I/O statement without assigning @@ -1187,7 +1187,7 @@ data_transfer_init (int read_flag) } else { - if (advance_status == ADVANCE_YES) + if (advance_status == ADVANCE_YES && !g.seen_dollar) current_unit->read_bad = 1; } @@ -1459,11 +1459,12 @@ finalize_transfer (void) { free_fnodes (); - if (advance_status == ADVANCE_NO) + if (advance_status == ADVANCE_NO || g.seen_dollar) { /* Most systems buffer lines, so force the partial record to be written out. */ flush (current_unit->s); + g.seen_dollar = 0; return; } |