From: Thomas Koenig Date: Wed, 4 Apr 2018 09:26:13 +0000 (+0000) Subject: re PR libfortran/85166 ([nvptx, libgfortran] Libgomp fortran tests using stop in... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=bb347ee22758f2fa8d657ff42519e878915b64cc;p=gcc.git re PR libfortran/85166 ([nvptx, libgfortran] Libgomp fortran tests using stop in offloaded fns fail to compile) 2018-04-04 Thomas Koenig PR libfortran/85166 * runtime/minimal.c (stop_numeric): Add new function in order to implement numeric stop on minimal targets. From-SVN: r259072 --- diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog index 8c6a71060ec..367c554275c 100644 --- a/libgfortran/ChangeLog +++ b/libgfortran/ChangeLog @@ -1,3 +1,9 @@ +2018-04-04 Thomas Koenig + + 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 * io/io.h (IOPARM_DT_DEFAULT_EXP): Rename to ... diff --git a/libgfortran/runtime/minimal.c b/libgfortran/runtime/minimal.c index 42011751825..e17666b7b82 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); +}