re PR fortran/31922 ([4.2 only] Accessing uninitialized variable for print *, trim(blank_string))

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.

From-SVN: r124754
This commit is contained in:
Jerry DeLisle 2007-05-16 00:37:55 +00:00
parent 86977b7206
commit d5638e6e67
2 changed files with 8 additions and 0 deletions

View File

@ -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

View File

@ -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;
}