On Wed, Nov 12, 2014 at 6:18 PM, H.J. Lu <hongjiu...@intel.com> wrote: > Hi, > > possible_placement_new checks if the structure is at least big enough to > hold the VPTR pointer. But it uses BITS_PER_WORD for pointer size, > which is incorrect for many ILP32 targets. This patch replaces it with > POINTER_SIZE. Tested on Linux/x32. OK for trunk?
Ok. Thanks, Richard. > Thanks. > > > H.J. > --- > 2014-11-12 H.J. Lu <hongjiu...@intel.com> > > PR tree-optimization/63828 > * ipa-polymorphic-call.c (possible_placement_new): Check > POINTER_SIZE, instead of BITS_PER_WORD, for pointer size. > > diff --git a/gcc/ipa-polymorphic-call.c b/gcc/ipa-polymorphic-call.c > index 33dd1a8..30b5db2 100644 > --- a/gcc/ipa-polymorphic-call.c > +++ b/gcc/ipa-polymorphic-call.c > @@ -106,7 +106,7 @@ possible_placement_new (tree type, tree expected_type, > { > return ((TREE_CODE (type) != RECORD_TYPE > || !TYPE_BINFO (type) > - || cur_offset >= BITS_PER_WORD > + || cur_offset >= POINTER_SIZE > || !polymorphic_type_binfo_p (TYPE_BINFO (type))) > && (!TYPE_SIZE (type) > || !tree_fits_shwi_p (TYPE_SIZE (type))