/* Implementation of the STOP statement.
- Copyright (C) 2002-2015 Free Software Foundation, Inc.
+ Copyright (C) 2002-2018 Free Software Foundation, Inc.
Contributed by Paul Brook <paul@nowt.org>
This file is part of the GNU Fortran runtime library (libgfortran).
<http://www.gnu.org/licenses/>. */
#include "libgfortran.h"
-#include <stdlib.h>
-#include <string.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
void
stop_numeric (GFC_INTEGER_4 code)
-{
- report_exception ();
- if (code == -1)
- code = 0;
- else
- st_printf ("STOP %d\n", (int)code);
-
- exit (code);
-}
-
-
-/* A Fortran 2008 numeric STOP statement. */
-
-extern _Noreturn void stop_numeric_f08 (GFC_INTEGER_4);
-export_proto(stop_numeric_f08);
-
-void
-stop_numeric_f08 (GFC_INTEGER_4 code)
{
report_exception ();
st_printf ("STOP %d\n", (int)code);