This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Another case of DCE deleting live code
- From: kenner at vlsi1 dot ultra dot nyu dot edu (Richard Kenner)
- To: dnovillo at redhat dot com
- Cc: gcc at gcc dot gnu dot org
- Date: Tue, 9 Nov 04 18:51:16 EST
- Subject: Re: Another case of DCE deleting live code
What I said is that if you want to use TYPE_REF_CAN_ALIAS_ALL, you use
it inside may_alias_p. That function is the core predicate of the
alias analyzer. So, if you are going to override the pure type
information, you do it there:
I thought that that was too late and the alias set information that was
passed to it was what needed to be updated, but I can confirm that what
you have also works.
Having said that. Why is it that the alias sets for the types
character[1..4]
and
struct X
{
character x;
};
are not considered to have conflicting alias sets? That makes little
sense to me.
Why should they be conflicting?
In Ada, even an array of integers does not conflict with integer unless
the components are adderssable because you can't have a pointer to an
integer within the array.
Similarly for nonaddressable fields in a RECORD_TYPE.