This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]