diff options
author | Jerry DeLisle <jvdelisle@gcc.gnu.org> | 2007-05-06 22:28:31 +0000 |
---|---|---|
committer | Jerry DeLisle <jvdelisle@gcc.gnu.org> | 2007-05-06 22:28:31 +0000 |
commit | cb13c28858b9c5c243241121206578b5f9f2827c (patch) | |
tree | da33f84dfec782004c14205e386d8a57f79aecc9 /libgfortran/io | |
parent | 982533a5b24488660e53ae55cfb4e036d84d31d8 (diff) | |
download | gcc-cb13c28858b9c5c243241121206578b5f9f2827c.zip gcc-cb13c28858b9c5c243241121206578b5f9f2827c.tar.gz gcc-cb13c28858b9c5c243241121206578b5f9f2827c.tar.bz2 |
re PR fortran/31201 (Too large unit number generates wrong code)
2007-05-06 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libfortran/31201
* runtime/error.c (runtime_error_at): New function.
(generate_error): Export this function.
* gfortran.map: Add _gfortran_generate_error and
_gfortran_runtime_error_at.
* libgfortran.h: Add comment to reference error codes in front end.
(library_start): Locate prototype with library_end macro and add
a new comment. Add prototype for runtime_error_at. Export prototype for
generate_error.
* io/lock.c (library_start): Fix check for error condition.
* io/transfer.c (data_transfer_init): Add library check.
From-SVN: r124479
Diffstat (limited to 'libgfortran/io')
-rw-r--r-- | libgfortran/io/lock.c | 4 | ||||
-rw-r--r-- | libgfortran/io/transfer.c | 3 |
2 files changed, 5 insertions, 2 deletions
diff --git a/libgfortran/io/lock.c b/libgfortran/io/lock.c index c39188f..39bb670 100644 --- a/libgfortran/io/lock.c +++ b/libgfortran/io/lock.c @@ -38,8 +38,8 @@ Boston, MA 02110-1301, USA. */ void library_start (st_parameter_common *cmp) { - if ((cmp->flags & IOPARM_HAS_IOSTAT) != 0) - *cmp->iostat = ERROR_OK; + if ((cmp->flags & IOPARM_LIBRETURN_ERROR) != 0) + return; cmp->flags &= ~IOPARM_LIBRETURN_MASK; } diff --git a/libgfortran/io/transfer.c b/libgfortran/io/transfer.c index 1e90e83..9735aae 100644 --- a/libgfortran/io/transfer.c +++ b/libgfortran/io/transfer.c @@ -1708,6 +1708,9 @@ data_transfer_init (st_parameter_dt *dtp, int read_flag) dtp->u.p.ionml = ionml; dtp->u.p.mode = read_flag ? READING : WRITING; + if ((dtp->common.flags & IOPARM_LIBRETURN_MASK) != IOPARM_LIBRETURN_OK) + return; + if ((cf & IOPARM_DT_HAS_SIZE) != 0) dtp->u.p.size_used = 0; /* Initialize the count. */ |