diff mbox series

[libfortran,committed] Implement stop_numeric for minimal targets

Message ID 751060e1-67cb-d290-4fd1-46b15b77fc1a@tkoenig.net
State New
Headers show
Series [libfortran,committed] Implement stop_numeric for minimal targets | expand

Commit Message

Thomas König April 4, 2018, 9:30 a.m. UTC
Hello world,

the recent patch to make the gfortran and libgomp testsuites more
standard conforming, by replacing CALL ABORT() with STOP N, led
to numerous testsuite failures on nvptx because stop_numeric
was not implemented in minimal.c.

I have committed the patch below in r259072 as obvious after Tom
de Vries had confirmed that it solves the problem.

Regards

	Thomas

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.
diff mbox series

Patch

Index: runtime/minimal.c
===================================================================
--- runtime/minimal.c	(Revision 259055)
+++ runtime/minimal.c	(Arbeitskopie)
@@ -187,3 +187,17 @@ 
 
   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);
+}