summaryrefslogtreecommitdiffstats
path: root/libgfortran
diff options
context:
space:
mode:
authorjvdelisle <jvdelisle@138bc75d-0d04-0410-961f-82ee72b054a4>2010-05-20 19:40:30 +0000
committerjvdelisle <jvdelisle@138bc75d-0d04-0410-961f-82ee72b054a4>2010-05-20 19:40:30 +0000
commit98c48d20dc97f33396f914b9bcb28ec9f3518e0f (patch)
tree80189f232ff0a14429673889ddbfce9c4cdece18 /libgfortran
parent976d38860d53e2fc538d130de111346d5e62682f (diff)
downloadppe42-gcc-98c48d20dc97f33396f914b9bcb28ec9f3518e0f.tar.gz
ppe42-gcc-98c48d20dc97f33396f914b9bcb28ec9f3518e0f.zip
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@159638 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgfortran')
-rw-r--r--libgfortran/ChangeLog6
-rw-r--r--libgfortran/runtime/stop.c12
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 <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
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);
}
OpenPOWER on IntegriCloud