This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/57417] [4.7/4.8 Regression] hang on volatile int array
- From: "ebotcazou at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 27 May 2013 21:08:04 +0000
- Subject: [Bug tree-optimization/57417] [4.7/4.8 Regression] hang on volatile int array
- Auto-submitted: auto-generated
- References: <bug-57417-4 at http dot gcc dot gnu dot org/bugzilla/>
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.