This is the mail archive of the
mailing list for the GCC project.
- From: "Joseph S. Myers" <jsm28 at cam dot ac dot uk>
- To: Daniel Berlin <dan at cgsoftware dot com>
- Cc: Richard Kenner <kenner at vlsi1 dot ultra dot nyu dot edu>, <rth at redhat dot com>, <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 3 Dec 2001 13:54:02 +0000 (GMT)
- Subject: Re: alias.c:nonoverlapping_component_refs_p
On Mon, 3 Dec 2001, Daniel Berlin wrote:
> On a RECORD_TYPE, it should be safe.
> As for Ada, the tree.def says:
> /* Struct in C, or record in Pascal. */
> /* Special fields:
> TYPE_FIELDS chain of FIELD_DECLs for the fields of the struct,
> and VAR_DECLs, TYPE_DECLs and CONST_DECLs for record-scope variables,
> types and enumerators.
> A few may need to be added for Pascal. */
> /* See the comment above, before ENUMERAL_TYPE, for how
> forward references to struct tags are handled in C. */
> DEFTREECODE (RECORD_TYPE, "record_type", 't', 0)
> If Ada has different semantics, it needs a different tree code, or some
> easy way to differentiate.
This is one place we need tree lowering. Start with a language-specific
tree produced by the front end, then lower it to a language-independent
tree, without any language-specific tree codes (including some of those
presently language-independent that logically relate more to C) and with
ordering (sequence point) and aliasing constraints explicitly encoded.
Then move to the mid-level RTL that has been discussed, then to current
RTL, with some optimisations at each stage of transformation. The front
end should work out at the lowering stage what the aliasing constraints
Joseph S. Myers