aboutsummaryrefslogtreecommitdiff
path: root/libgfortran
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
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')
-rw-r--r--libgfortran/ChangeLog6
-rw-r--r--libgfortran/runtime/minimal.c14
2 files changed, 20 insertions, 0 deletions
diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog
index 8c6a710..367c554 100644
--- a/libgfortran/ChangeLog
+++ b/libgfortran/ChangeLog
@@ -1,3 +1,9 @@
+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.
+
2018-03-28 Jakub Jelinek <jakub@redhat.com>
* io/io.h (IOPARM_DT_DEFAULT_EXP): Rename to ...
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);
+}