This is the mail archive of the gcc-bugs@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]

[Bug tree-optimization/57417] [4.7/4.8 Regression] hang on volatile int array


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

--- Comment #7 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
> 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?

No, we cannot guarantee that.  But AFAICS operand_equal_p rejects two
ADDR_EXPRs of the same expression when !OEP_ONLY_CONST only because it has
TREE_SIDE_EFFECTS and I don't see why, IOW my understanding is that it should
be possible to add a OEP_ADDRESS_OF flag when !OEP_ONLY_CONST and use it to be
less conservative.


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