diff options
Diffstat (limited to 'libgfortran/intrinsics/exit.c')
-rw-r--r-- | libgfortran/intrinsics/exit.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/libgfortran/intrinsics/exit.c b/libgfortran/intrinsics/exit.c index f15d567..fcb792e 100644 --- a/libgfortran/intrinsics/exit.c +++ b/libgfortran/intrinsics/exit.c @@ -30,18 +30,20 @@ Boston, MA 02111-1307, USA. */ /* SUBROUTINE EXIT(STATUS) INTEGER, INTENT(IN), OPTIONAL :: STATUS */ +extern void exit_i4 (GFC_INTEGER_4 *); +export_proto(exit_i4); + void -prefix(exit_i4) (GFC_INTEGER_4 * status) +exit_i4 (GFC_INTEGER_4 * status) { - if (status == NULL) - exit(0); - exit(*status); + exit (status ? *status : 0); } +extern void exit_i8 (GFC_INTEGER_8 *); +export_proto(exit_i8); + void -prefix(exit_i8) (GFC_INTEGER_8 * status) +exit_i8 (GFC_INTEGER_8 * status) { - if (status == NULL) - exit(0); - exit((int) *status); + exit (status ? *status : 0); } |