re PR fortran/43851 (Add _gfortran_error_stop_numeric)
authorJerry DeLisle <jvdelisle@gcc.gnu.org>
Thu, 20 May 2010 19:40:30 +0000 (19:40 +0000)
committerJerry DeLisle <jvdelisle@gcc.gnu.org>
Thu, 20 May 2010 19:40:30 +0000 (19:40 +0000)
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

libgfortran/ChangeLog
libgfortran/runtime/stop.c

index 0f00141..e90848c 100644 (file)
@@ -1,3 +1,9 @@
+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.
+
 2010-05-19 Jerry DeLisle <jvdelisle@gcc.gnu.org>
 
        PR fortran/43851
index 87c0411..f2a1233 100644 (file)
@@ -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);
 }