This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix PR middle-end/17746
- From: kenner at vlsi1 dot ultra dot nyu dot edu (Richard Kenner)
- To: ebotcazou at libertysurf dot fr
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Tue, 26 Oct 04 09:24:20 EDT
- Subject: Re: [PATCH] Fix PR middle-end/17746
In light of this, my interpretation is that Richard's strategy was to
force get_inner_reference to "temporarily" exit, so that the
VIEW_CONVERT_EXPR expander can take control and step up the alignment:
Perhaps, but I don't rememember that and it's a kludge if so. If the
VIEW_CONVERT_EXPR is the outermost operation, we may need to "step
things up", but that doesn't use get_inner_reference. If it's in the
middle of a reference chain, I'm not convinced that anything has to be
done, but if it does, then somebody else ought to do it. Admittedly,
this is a complex case.
About the handled_component_p/get_inner_reference discrepancy: a
widely used idiom is
while (handled_component_p (t))
t = TREE_OPERAND (t, 0);
So if we made handled_component_p reject VIEW_CONVERT_EXPRs with the
TYPE_ALIGN_OK flag, I suspect we would probably need to add explicit
|| ((TREE_CODE (t) == VIEW_CONVERT_EXPR && TYPE_ALIGN_OK (t) && ...)
all over the place.
Indeed that's out of the question. Actually, my goal is to get rid of
handled_component_p in the first place and just use REFERENCE_CLASS_P.
That was part of the motivation of changing some codes to tcc_reference.