diff options
author | Jerry DeLisle <jvdelisle@gcc.gnu.org> | 2010-05-20 19:40:30 +0000 |
---|---|---|
committer | Jerry DeLisle <jvdelisle@gcc.gnu.org> | 2010-05-20 19:40:30 +0000 |
commit | 00b97acd1bfd6400cca3ea6e280a1a16baa1fe2c (patch) | |
tree | 80189f232ff0a14429673889ddbfce9c4cdece18 /libgfortran/runtime/stop.c | |
parent | 1a494ab5a5303d7157029689758893e63b7f54e9 (diff) | |
download | gcc-00b97acd1bfd6400cca3ea6e280a1a16baa1fe2c.zip gcc-00b97acd1bfd6400cca3ea6e280a1a16baa1fe2c.tar.gz gcc-00b97acd1bfd6400cca3ea6e280a1a16baa1fe2c.tar.bz2 |
re PR fortran/43851 (Add _gfortran_error_stop_numeric)
2010-05-20 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR fortran/43851
* runtime/stop.c (stop_string): Make sure nothing is emitted for
blank stop.
From-SVN: r159638
Diffstat (limited to 'libgfortran/runtime/stop.c')
-rw-r--r-- | libgfortran/runtime/stop.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/libgfortran/runtime/stop.c b/libgfortran/runtime/stop.c index 87c0411..f2a1233 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); } |