aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorDave Korn <dave.korn.cygwin@gmail.com>2010-11-11 13:29:46 +0000
committerDave Korn <davek@gcc.gnu.org>2010-11-11 13:29:46 +0000
commita16e07c6822d6b68ecbcab07205e015363dcd4e7 (patch)
treec7e19d09bacfcc8a51c1aedc4a75683025f33c24 /gcc
parentad269884765cfe6e5f4cf1f3abb50b4e74f79ac9 (diff)
downloadgcc-a16e07c6822d6b68ecbcab07205e015363dcd4e7.zip
gcc-a16e07c6822d6b68ecbcab07205e015363dcd4e7.tar.gz
gcc-a16e07c6822d6b68ecbcab07205e015363dcd4e7.tar.bz2
lto-streamer-out.c (write_symbol): Use int_size_in_bytes rather than assembling high and low parts of size if...
* lto-streamer-out.c (write_symbol): Use int_size_in_bytes rather than assembling high and low parts of size if not using 32-bit HWINT; else use DECL_SIZE_UNITS, not DECL_SIZE. From-SVN: r166600
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/lto-streamer-out.c8
2 files changed, 12 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index db8367d..78e48c4 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2010-11-11 Dave Korn <dave.korn.cygwin@gmail.com>
+
+ * lto-streamer-out.c (write_symbol): Use int_size_in_bytes rather than
+ assembling high and low parts of size if not using 32-bit HWINT; else
+ use DECL_SIZE_UNITS, not DECL_SIZE.
+
2010-11-11 Martin Jambor <mjambor@suse.cz>
PR tree-optimization/46383
diff --git a/gcc/lto-streamer-out.c b/gcc/lto-streamer-out.c
index 03150b7..2a4d985 100644
--- a/gcc/lto-streamer-out.c
+++ b/gcc/lto-streamer-out.c
@@ -2435,8 +2435,12 @@ write_symbol (struct lto_streamer_cache_d *cache,
if (kind == GCCPK_COMMON
&& DECL_SIZE (t)
&& TREE_CODE (DECL_SIZE (t)) == INTEGER_CST)
- size = (((uint64_t) TREE_INT_CST_HIGH (DECL_SIZE (t))) << 32)
- | TREE_INT_CST_LOW (DECL_SIZE (t));
+ {
+ size = (HOST_BITS_PER_WIDE_INT >= 64)
+ ? (uint64_t) int_size_in_bytes (TREE_TYPE (t))
+ : (((uint64_t) TREE_INT_CST_HIGH (DECL_SIZE_UNIT (t))) << 32)
+ | TREE_INT_CST_LOW (DECL_SIZE_UNIT (t));
+ }
else
size = 0;