Hi, On Wed, Feb 05, 2014 at 12:47:30AM +0100, Jan Hubicka wrote: > > > - if (TREE_CODE (t) != TREE_BINFO) > > > + /* Try to work out BINFO from virtual table pointer value in > > > replacements. */ > > > + if (!t && agg_reps && !ie->indirect_info->by_ref) > > > > At this point you know that !ie->indirect_info->polymorphic is set and > > thus ie->indirect_info->by_ref is always false because it really has > > no meaning (it is only meaningful when agg_contents is set which is > > mutually exclusive with the polymorphic flag). > > I was worried here about case where in future we may want to represent call of > virtual methods from pointers passed by reference (i.e. in some other object). > We don't do that at the moment, but for that would really need better jump > functions. > > If you preffer, I can remove that check. >
I think it would be better, yes. IIRC, We want to re-organize indirect_info anyway (I vaguely remember we want to split the overloaded offset field into two but forgot the exact reason why but I have it written somewhere), I suppose we'll be turning it into a union (or class hierarchy?) and this would make it slightly awkward. If we ever support the pointer-by-reference scenario, quite a few more places will need to be adjusted anyway. Thanks, Martin