Commit d25a79ea by Richard Guenther Committed by Richard Biener

re PR c/48650 (valgrind: Invalid write of size 8 in build_string (tree.c:1524))

2011-04-18  Richard Guenther  <rguenther@suse.de>

	PR middle-end/48650
	* tree.c (build_string): STRING_CST is now derived from tree_typed.

From-SVN: r172642
parent 7d5fc814
2011-04-18 Richard Guenther <rguenther@suse.de>
PR middle-end/48650
* tree.c (build_string): STRING_CST is now derived from tree_typed.
2011-04-18 Eric Botcazou <ebotcazou@adacore.com> 2011-04-18 Eric Botcazou <ebotcazou@adacore.com>
PR lto/48492 PR lto/48492
......
...@@ -1521,7 +1521,7 @@ build_string (int len, const char *str) ...@@ -1521,7 +1521,7 @@ build_string (int len, const char *str)
s = ggc_alloc_tree_node (length); 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_SET_CODE (s, STRING_CST);
TREE_CONSTANT (s) = 1; TREE_CONSTANT (s) = 1;
TREE_STRING_LENGTH (s) = len; TREE_STRING_LENGTH (s) = len;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment