#include <stdarg.h>
#include <string.h>
#include <float.h>
+#include <errno.h>
#include "libgfortran.h"
#include "../io/io.h"
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;
{
/* Set the error status. */
if ((cmp->flags & IOPARM_HAS_IOSTAT))
- *cmp->iostat = family;
+ *cmp->iostat = (family == ERROR_OS) ? errno : family;
if (message == NULL)
message =
standard does not contain the requested bits. */
try
-notify_std (int std, const char * message)
+notify_std (st_parameter_common *cmp, int std, const char * message)
{
int warning;
if (!warning)
{
+ recursion_check ();
+ show_locus (cmp);
st_printf ("Fortran runtime error: %s\n", message);
sys_exit (2);
}
else
- st_printf ("Fortran runtime warning: %s\n", message);
+ {
+ show_locus (cmp);
+ st_printf ("Fortran runtime warning: %s\n", message);
+ }
return FAILURE;
}