This is the mail archive of the
mailing list for the GCC project.
- From: Daniel Berlin <dan at cgsoftware dot com>
- To: Richard Kenner <kenner at vlsi1 dot ultra dot nyu dot edu>
- Cc: <rth at redhat dot com>, <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 3 Dec 2001 08:11:21 -0500 (EST)
- Subject: Re: alias.c:nonoverlapping_component_refs_p
On Mon, 3 Dec 2001, Richard Kenner wrote:
> I don't believe it is safe to conclude that if two fields aren't the same,
> they don't overlap. An example of a case where they do is an Ada subtype
> of a variant record.
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.