From 00b97acd1bfd6400cca3ea6e280a1a16baa1fe2c Mon Sep 17 00:00:00 2001 From: Jerry DeLisle Date: Thu, 20 May 2010 19:40:30 +0000 Subject: [PATCH] re PR fortran/43851 (Add _gfortran_error_stop_numeric) 2010-05-20 Jerry DeLisle PR fortran/43851 * runtime/stop.c (stop_string): Make sure nothing is emitted for blank stop. From-SVN: r159638 --- libgfortran/ChangeLog | 6 ++++++ libgfortran/runtime/stop.c | 12 +++++++----- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog index 0f001411834..e90848cf57f 100644 --- a/libgfortran/ChangeLog +++ b/libgfortran/ChangeLog @@ -1,3 +1,9 @@ +2010-05-20 Jerry DeLisle + + PR fortran/43851 + * runtime/stop.c (stop_string): Make sure nothing is emitted for + blank stop. + 2010-05-19 Jerry DeLisle PR fortran/43851 diff --git a/libgfortran/runtime/stop.c b/libgfortran/runtime/stop.c index 87c0411acbe..f2a12338175 100644 --- a/libgfortran/runtime/stop.c +++ b/libgfortran/runtime/stop.c @@ -44,11 +44,13 @@ stop_numeric (GFC_INTEGER_4 code) void stop_string (const char *string, GFC_INTEGER_4 len) { - st_printf ("STOP "); - while (len--) - st_printf ("%c", *(string++)); - st_printf ("\n"); - + if (string) + { + st_printf ("STOP "); + while (len--) + st_printf ("%c", *(string++)); + st_printf ("\n"); + } sys_exit (0); } -- 2.11.4.GIT