This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[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;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]