aboutsummaryrefslogtreecommitdiff
path: root/gcc/ggc-zone.c
diff options
context:
space:
mode:
authorDaniel Berlin <dberlin@dberlin.org>2003-12-01 17:58:13 +0000
committerDaniel Berlin <dberlin@gcc.gnu.org>2003-12-01 17:58:13 +0000
commit7297afa029130a56790114e7a244b21ba603fb45 (patch)
tree430b56172ed369bae3109cc6b44fa1f1104f467f /gcc/ggc-zone.c
parentfccab17eadb0b80031502a66403aa9541d531ce9 (diff)
downloadgcc-7297afa029130a56790114e7a244b21ba603fb45.zip
gcc-7297afa029130a56790114e7a244b21ba603fb45.tar.gz
gcc-7297afa029130a56790114e7a244b21ba603fb45.tar.bz2
ggc-zone.c (ggc_pch_write_object): Calculate object size using ggc_get_size (which accounts for large objects...
2003-12-01 Daniel Berlin <dberlin@dberlin.org> * ggc-zone.c (ggc_pch_write_object): Calculate object size using ggc_get_size (which accounts for large objects properly). From-SVN: r74114
Diffstat (limited to 'gcc/ggc-zone.c')
-rw-r--r--gcc/ggc-zone.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/ggc-zone.c b/gcc/ggc-zone.c
index dbca761..d9c82e6 100644
--- a/gcc/ggc-zone.c
+++ b/gcc/ggc-zone.c
@@ -1663,7 +1663,7 @@ ggc_pch_write_object (struct ggc_pch_data *d ATTRIBUTE_UNUSED,
if (!is_string)
{
struct alloc_chunk *chunk = (struct alloc_chunk *) ((char *)x - CHUNK_OVERHEAD);
- size = chunk->size;
+ size = ggc_get_size (x);
if (fwrite (chunk, size + CHUNK_OVERHEAD, 1, f) != 1)
fatal_error ("can't write PCH file: %m");
d->written += size + CHUNK_OVERHEAD;