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

--- Comment #5 from rguenther at suse dot de <rguenther at suse dot de> ---
On Mon, 27 May 2013, ebotcazou at gcc dot gnu.org wrote:

> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57417
> 
> --- Comment #4 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
> > It seems to me that there is no good reason to ever treat addresses of
> > TREE_SIDE_EFFECTS trees as different if there is not TREE_SIDE_EFFECTS
> > on offset determining pieces (though that would rely on gimplification
> > for COMPONENT_REFs?).
> 
> Yes, I agree that the handling of addresses looks overly conservative.

I suppose TREE_SIDE_EFFECTS matter on the offset expression of
a get_inner_reference call on op0 of the ADDR_EXPR.  For Ada that
would involve looking at SUBSTITUTE_PLACEHOLDER_IN_EXPR (DECL_FIELD_OFFSET 
(field), exp) for example - or do we somehow guarantee that the
offset expressions that do not appear in indexes like operand 1 of
ARRAY_REFs do not contain side-effects?

Reply via email to