mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-03-22 07:00:29 +08:00
re PR fortran/26509 (incorrect behaviour of error-handler for direct access write)
2006-03-17 Jerry DeLisle <jvdelisle@gcc.gnu.org> PR libgfortran/26509 * libgfortran.h: Add ERROR_DIRECT_EOR. * runtime/error.c (translate_error): Add translation for new error. * io/transfer.c (write_buf): Add check for EOR when mode is direct access. From-SVN: r112198
This commit is contained in:
parent
8e0524013a
commit
54f9e2781e
@ -1,3 +1,11 @@
|
||||
2006-03-17 Jerry DeLisle <jvdelisle@gcc.gnu.org>
|
||||
|
||||
PR libgfortran/26509
|
||||
* libgfortran.h: Add ERROR_DIRECT_EOR.
|
||||
* runtime/error.c (translate_error): Add translation for new error.
|
||||
* io/transfer.c (write_buf): Add check for EOR when mode is
|
||||
direct access.
|
||||
|
||||
2006-03-13 Paul Thomas <pault@gcc.gnu.org>
|
||||
|
||||
PR fortran/25378
|
||||
|
@ -384,7 +384,10 @@ write_buf (st_parameter_dt *dtp, void *buf, size_t nbytes)
|
||||
{
|
||||
if (dtp->u.p.current_unit->bytes_left < nbytes)
|
||||
{
|
||||
generate_error (&dtp->common, ERROR_EOR, NULL);
|
||||
if (dtp->u.p.current_unit->flags.access == ACCESS_DIRECT)
|
||||
generate_error (&dtp->common, ERROR_DIRECT_EOR, NULL);
|
||||
else
|
||||
generate_error (&dtp->common, ERROR_EOR, NULL);
|
||||
return FAILURE;
|
||||
}
|
||||
|
||||
|
@ -380,6 +380,7 @@ typedef enum
|
||||
ERROR_INTERNAL,
|
||||
ERROR_INTERNAL_UNIT,
|
||||
ERROR_ALLOCATION,
|
||||
ERROR_DIRECT_EOR,
|
||||
ERROR_LAST /* Not a real error, the last error # + 1. */
|
||||
}
|
||||
error_codes;
|
||||
|
@ -431,6 +431,10 @@ translate_error (int code)
|
||||
p = "Internal unit I/O error";
|
||||
break;
|
||||
|
||||
case ERROR_DIRECT_EOR:
|
||||
p = "Write exceeds length of DIRECT access record";
|
||||
break;
|
||||
|
||||
default:
|
||||
p = "Unknown error code";
|
||||
break;
|
||||
|
Loading…
x
Reference in New Issue
Block a user