http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51994

--- Comment #34 from rguenther at suse dot de <rguenther at suse dot de> 
2012-02-02 08:56:04 UTC ---
On Wed, 1 Feb 2012, ebotcazou at gcc dot gnu.org wrote:

> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51994
> 
> --- Comment #32 from Eric Botcazou <ebotcazou at gcc dot gnu.org> 2012-02-01 
> 16:34:30 UTC ---
> > The base object can be an indirect reference, so yes, there doesn't have
> > to be an overall positive offset (well, yes, to the _real_ object,
> > but we don't see that).
> 
> If this is an indirect reference, there is no base object by definition.  So
> I'm not sure we should care in get_inner_reference and, in any case, I'm not
> sure what to do.  Probably avoid sending MEM_REF to get_inner_reference in 
> this
> case,
> after all it's clearly not a handled_component_p-like thing.

Well, you can have component refs wrapped around a MEM_REF (or formerly
an INDIRECT_REF).  The only difference now is that the MEM_REF may
have a (negative) constant offset embedded.  Now, only if the MEM_REF
is based on an ADDR_EXPR (and thus a real object) we factor in its
(possibly negative) offset to bitpos.  So, hum - now I don't see
as easily that we can get a negative bitpos from a not
undefined input ... (maybe except for the Ada fat pointer case).

So your patch is probably ok (can you try verifying we don't get
(too much) codegen differences on a bootstrap?)

Richard.

Reply via email to