This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [RFC] ignoring type alias conflicts between structures and scalars
- 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: Thu, 25 Nov 04 11:22:11 EST
- Subject: Re: [RFC] ignoring type alias conflicts between structures and scalars
Ah, OK. So, it would be safe to short-circuit the alias conflict then?
I don't understand the structure of the code well enough to answer that
definitively, but I'm concerned.
alias_sets_conflict_p is only called eight places in the compiler, so I'd
prefer to either modify it or add a new function to give the relation you
want.
But can you state precisely what that relation *is*?
If I have two pointers, one to struct_int_float and one to int, it's
certainly the case that a store into one can affect what's pointed to by the
other and that's what the alias set conflict is trying to address.
So what *exactly* are you trying to test?
Right, but we don't even warn about it.
Indeed.
I'm thinking that I also need a check for -fstrict-aliasing in the patch.
That's another argument for sticking with functions.c in alias.c since
they already take that into account.
Would it be the same problem if we were dealing with a union instead of
a structure?
Yes. And arrays.