From: Andrew Pinski Date: Thu, 29 Jun 2006 16:28:04 +0000 (-0700) Subject: tree.c (tree_size): Do not waste tail padding in struct tree_string and make the... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=43b50eb2bfbf848d881d32ca8dbdd2aa7de8ecca;p=gcc.git tree.c (tree_size): Do not waste tail padding in struct tree_string and make the size be the same... 2006-06-28 Andrew Pinski * tree.c (tree_size): Do not waste tail padding in struct tree_string and make the size be the same as build_string will generate. From-SVN: r115072 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 8044ed5e255..4814be31e39 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2006-06-28 Andrew Pinski + + * tree.c (tree_size): Do not waste tail padding in + struct tree_string and make the size be the same as + build_string will generate. + 2006-06-28 Jason Merrill PR c++/27768 diff --git a/gcc/tree.c b/gcc/tree.c index e0e6716c2f6..02e7c7c6828 100644 --- a/gcc/tree.c +++ b/gcc/tree.c @@ -419,7 +419,7 @@ tree_size (tree node) + (TREE_VEC_LENGTH (node) - 1) * sizeof(char *)); case STRING_CST: - return sizeof (struct tree_string) + TREE_STRING_LENGTH (node) - 1; + return TREE_STRING_LENGTH (node) + offsetof (struct tree_string, str) + 1; case OMP_CLAUSE: return (sizeof (struct tree_omp_clause)