This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix wrong common symbol size in LTO symtabs.
- From: Richard Henderson <rth at redhat dot com>
- To: Dave Korn <dave dot korn dot cygwin at gmail dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 09 Nov 2010 13:30:57 -0800
- Subject: Re: [PATCH] Fix wrong common symbol size in LTO symtabs.
- References: <4CD9BFE1.20703@gmail.com>
On 11/09/2010 01:40 PM, Dave Korn wrote:
> - size = (((uint64_t) TREE_INT_CST_HIGH (DECL_SIZE (t))) << 32)
> - | TREE_INT_CST_LOW (DECL_SIZE (t));
> + size = (((uint64_t) TREE_INT_CST_HIGH (DECL_SIZE_UNIT (t))) << 32)
> + | TREE_INT_CST_LOW (DECL_SIZE_UNIT (t));
Note this is wrong for 64-bit HWI. Better is
size = int_size_in_bytes (t);
You'll get a -1 if it's not representable as HWI.
r~