aboutsummaryrefslogtreecommitdiff
path: root/libgfortran
diff options
context:
space:
mode:
authorThomas Schwinge <thomas@codesourcery.com>2019-10-08 12:20:41 +0200
committerThomas Schwinge <tschwinge@gcc.gnu.org>2019-10-08 12:20:41 +0200
commitca72b7804521cb2fe3c0da170cdaae57e3a8dfbb (patch)
tree03206d09595c48ccddce8101815efa9c81ad6296 /libgfortran
parent41bc80c3cd475d5239e310ad5f40a2e17e50bcf9 (diff)
Extend 'libgfortran/runtime/minimal.c' per r274599 "PR fortran/68401 Improve allocation error message"
libgfortran/ PR fortran/68401 * runtime/minimal.c (os_error_at): New function. From-SVN: r276691
Diffstat (limited to 'libgfortran')
-rw-r--r--libgfortran/ChangeLog3
-rw-r--r--libgfortran/runtime/minimal.c23
2 files changed, 25 insertions, 1 deletions
diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog
index 9e3b1f8bad8..c5a45333042 100644
--- a/libgfortran/ChangeLog
+++ b/libgfortran/ChangeLog
@@ -1,5 +1,8 @@
2019-10-08 Thomas Schwinge <thomas@codesourcery.com>
+ PR fortran/68401
+ * runtime/minimal.c (os_error_at): New function.
+
* runtime/minimal.c: Revise.
2019-10-05 Paul Thomas <pault@gcc.gnu.org>
diff --git a/libgfortran/runtime/minimal.c b/libgfortran/runtime/minimal.c
index a633bc1ce0f..bdaf878ffcb 100644
--- a/libgfortran/runtime/minimal.c
+++ b/libgfortran/runtime/minimal.c
@@ -215,7 +215,28 @@ os_error (const char *message)
estr_write ("\n");
exit_error (1);
}
-iexport(os_error);
+iexport(os_error); /* TODO, DEPRECATED, ABI: Should not be exported
+ anymore when bumping so version. */
+
+
+/* Improved version of os_error with a printf style format string and
+ a locus. */
+
+void
+os_error_at (const char *where, const char *message, ...)
+{
+ va_list ap;
+
+ recursion_check ();
+ estr_write (where);
+ estr_write (": ");
+ va_start (ap, message);
+ estr_vprintf (message, ap);
+ va_end (ap);
+ estr_write ("\n");
+ exit_error (1);
+}
+iexport(os_error_at);
/* void runtime_error()-- These are errors associated with an