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  <rguent...@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;

Reply via email to