diff options
author | jvdelisle <jvdelisle@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-04-28 23:55:30 +0000 |
---|---|---|
committer | jvdelisle <jvdelisle@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-04-28 23:55:30 +0000 |
commit | 2daf711f18c4e653b9d7f9011070843c7c61674a (patch) | |
tree | dffd37010c81de1a6b1b5b63e4a5c1e0b99c39a6 /libgfortran | |
parent | f720b7c6c1da3d57f73075d51a6ab1e36cb14f4b (diff) | |
download | gcc-2daf711f18c4e653b9d7f9011070843c7c61674a.tar.gz |
2006-04-28 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libgfortran/27304
* io/transfer.c (formatted_transfer_scalar): Generate error if data
descriptors are exhausted.
* io/format.c (next_format0): Fix comment.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@113363 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgfortran')
-rw-r--r-- | libgfortran/ChangeLog | 7 | ||||
-rw-r--r-- | libgfortran/io/format.c | 2 | ||||
-rw-r--r-- | libgfortran/io/transfer.c | 8 |
3 files changed, 15 insertions, 2 deletions
diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog index 00acecfd0e3..c8ecbfcc07e 100644 --- a/libgfortran/ChangeLog +++ b/libgfortran/ChangeLog @@ -1,3 +1,10 @@ +2006-04-28 Jerry DeLisle <jvdelisle@gcc.gnu.org> + + PR libgfortran/27304 + * io/transfer.c (formatted_transfer_scalar): Generate error if data + descriptors are exhausted. + * io/format.c (next_format0): Fix comment. + 2006-04-22 Jerry DeLisle <jvdelisle@gcc.gnu.org> PR libgfortran/20257 diff --git a/libgfortran/io/format.c b/libgfortran/io/format.c index 9528dbad277..96d7019eedc 100644 --- a/libgfortran/io/format.c +++ b/libgfortran/io/format.c @@ -1059,7 +1059,7 @@ next_format0 (fnode * f) /* next_format()-- Return the next format node. If the format list * ends up being exhausted, we do reversion. Reversion is only * allowed if the we've seen a data descriptor since the - * initialization or the last reversion. We return NULL if the there + * initialization or the last reversion. We return NULL if there * are no more data descriptors to return (which is an error * condition). */ diff --git a/libgfortran/io/transfer.c b/libgfortran/io/transfer.c index 743840102db..43af8fbc938 100644 --- a/libgfortran/io/transfer.c +++ b/libgfortran/io/transfer.c @@ -670,7 +670,13 @@ formatted_transfer_scalar (st_parameter_dt *dtp, bt type, void *p, int len, f = next_format (dtp); if (f == NULL) - return; /* No data descriptors left (already raised). */ + { + /* No data descriptors left. */ + if (n > 0) + generate_error (&dtp->common, ERROR_FORMAT, + "Insufficient data descriptors in format after reversion"); + return; + } /* Now discharge T, TR and X movements to the right. This is delayed until a data producing format to suppress trailing spaces. */ |