summaryrefslogtreecommitdiff
path: root/libgfortran
diff options
context:
space:
mode:
authorjvdelisle <jvdelisle@138bc75d-0d04-0410-961f-82ee72b054a4>2007-05-16 00:37:55 +0000
committerjvdelisle <jvdelisle@138bc75d-0d04-0410-961f-82ee72b054a4>2007-05-16 00:37:55 +0000
commit20e9427e0f63c0441934a4cf81fa818565a21b09 (patch)
tree57d0801d232f09e6266762a6182bc0e4ff20cfef /libgfortran
parent26c49ffa890619c698de3fec066cb78e4f4ee3cf (diff)
downloadgcc-20e9427e0f63c0441934a4cf81fa818565a21b09.tar.gz
2007-05-15 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libfortran/31922 * intrinsics/string_intrinsics.c (string_trim): Set result to null if string length is zero. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@124754 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgfortran')
-rw-r--r--libgfortran/ChangeLog6
-rw-r--r--libgfortran/intrinsics/string_intrinsics.c2
2 files changed, 8 insertions, 0 deletions
diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog
index dec751f9c85..531787f3289 100644
--- a/libgfortran/ChangeLog
+++ b/libgfortran/ChangeLog
@@ -1,3 +1,9 @@
+2007-05-15 Jerry DeLisle <jvdelisle@gcc.gnu.org>
+
+ PR libfortran/31922
+ * intrinsics/string_intrinsics.c (string_trim): Set result to null if
+ string length is zero.
+
2007-05-15 Tobias Burnus <burnus@net-b.de>
PR libfortran/31915
diff --git a/libgfortran/intrinsics/string_intrinsics.c b/libgfortran/intrinsics/string_intrinsics.c
index 1a4b1593270..7c22c16abfe 100644
--- a/libgfortran/intrinsics/string_intrinsics.c
+++ b/libgfortran/intrinsics/string_intrinsics.c
@@ -171,6 +171,8 @@ string_trim (GFC_INTEGER_4 * len, void ** dest, GFC_INTEGER_4 slen,
/* copy string if necessary. */
memmove (*dest, src, *len);
}
+ else
+ *dest = NULL;
}