From: Richard Guenther Date: Mon, 18 Apr 2011 11:18:01 +0000 (+0000) Subject: re PR c/48650 (valgrind: Invalid write of size 8 in build_string (tree.c:1524)) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d25a79eae6570f26000cadd9b25459d7d234dd33;p=gcc.git re PR c/48650 (valgrind: Invalid write of size 8 in build_string (tree.c:1524)) 2011-04-18 Richard Guenther PR middle-end/48650 * tree.c (build_string): STRING_CST is now derived from tree_typed. From-SVN: r172642 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b6f114715ae..e2c4a019d07 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2011-04-18 Richard Guenther + + PR middle-end/48650 + * tree.c (build_string): STRING_CST is now derived from tree_typed. + 2011-04-18 Eric Botcazou PR lto/48492 diff --git a/gcc/tree.c b/gcc/tree.c index c233a5c9aeb..e36d4d8d8c4 100644 --- a/gcc/tree.c +++ b/gcc/tree.c @@ -1521,7 +1521,7 @@ build_string (int len, const char *str) s = ggc_alloc_tree_node (length); - memset (s, 0, sizeof (struct tree_common)); + memset (s, 0, sizeof (struct tree_typed)); TREE_SET_CODE (s, STRING_CST); TREE_CONSTANT (s) = 1; TREE_STRING_LENGTH (s) = len;