aboutsummaryrefslogtreecommitdiff
path: root/libgfortran/runtime/minimal.c
diff options
context:
space:
mode:
authorThomas Koenig <tkoenig@gcc.gnu.org>2018-04-04 09:26:13 +0000
committerThomas Koenig <tkoenig@gcc.gnu.org>2018-04-04 09:26:13 +0000
commitbb347ee22758f2fa8d657ff42519e878915b64cc (patch)
tree527421e61a97b4f248f102f84b90e93746f0416d /libgfortran/runtime/minimal.c
parent76dc9cb5971da64985103f737c5d163ef97d2d6b (diff)
downloadgcc-bb347ee22758f2fa8d657ff42519e878915b64cc.zip
gcc-bb347ee22758f2fa8d657ff42519e878915b64cc.tar.gz
gcc-bb347ee22758f2fa8d657ff42519e878915b64cc.tar.bz2
re PR libfortran/85166 ([nvptx, libgfortran] Libgomp fortran tests using stop in offloaded fns fail to compile)
2018-04-04 Thomas Koenig <tkoenig@gcc.gnu.org> PR libfortran/85166 * runtime/minimal.c (stop_numeric): Add new function in order to implement numeric stop on minimal targets. From-SVN: r259072
Diffstat (limited to 'libgfortran/runtime/minimal.c')
-rw-r--r--libgfortran/runtime/minimal.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/libgfortran/runtime/minimal.c b/libgfortran/runtime/minimal.c
index 4201175..e17666b 100644
--- a/libgfortran/runtime/minimal.c
+++ b/libgfortran/runtime/minimal.c
@@ -187,3 +187,17 @@ sys_abort (void)
abort();
}
+
+/* A numeric STOP statement. */
+
+extern _Noreturn void stop_numeric (int, bool);
+export_proto(stop_numeric);
+
+void
+stop_numeric (int code, bool quiet)
+{
+ if (!quiet)
+ printf ("STOP %d\n", code);
+
+ exit (code);
+}