This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Fix PR48650
- From: Richard Guenther <rguenther at suse dot de>
- To: gcc-patches at gcc dot gnu dot org
- Cc: froydnj at codesourcery dot com
- Date: Mon, 18 Apr 2011 12:46:52 +0200 (CEST)
- Subject: [PATCH] Fix PR48650
STRING_CST is now derived from tree_typed but we still clear a
tree_common sized chunk. Nathan, maybe grep for other sizeof()s
around the tree?
Installed as obvious.
Richard.
2011-04-18 Richard Guenther <rguenther@suse.de>
PR middle-end/48650
* tree.c (build_string): STRING_CST is now derived from tree_typed.
Index: gcc/tree.c
===================================================================
*** gcc/tree.c (revision 172640)
--- gcc/tree.c (working copy)
*************** build_string (int len, const char *str)
*** 1521,1527 ****
s = ggc_alloc_tree_node (length);
! memset (s, 0, sizeof (struct tree_common));
TREE_SET_CODE (s, STRING_CST);
TREE_CONSTANT (s) = 1;
TREE_STRING_LENGTH (s) = len;
--- 1521,1527 ----
s = ggc_alloc_tree_node (length);
! memset (s, 0, sizeof (struct tree_typed));
TREE_SET_CODE (s, STRING_CST);
TREE_CONSTANT (s) = 1;
TREE_STRING_LENGTH (s) = len;