This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix wrong common symbol size in LTO symtabs.


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~


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]