aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/tree.c2
2 files changed, 7 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 8044ed5..4814be3 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2006-06-28 Andrew Pinski <pinskia@gmail.com>
+
+ * 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 <jason@redhat.com>
PR c++/27768
diff --git a/gcc/tree.c b/gcc/tree.c
index e0e6716..02e7c7c 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)