This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] fix aliasing for chars in global structure
"Joseph S. Myers" <jsm28@cam.ac.uk> writes:
> On Sun, 10 Mar 2002, Dan Nicolaescu wrote:
>
> > The extra loads are generated because the references to the "char"
> > fields are put in alias set 0. That is a mistake, they are references
> > to a char, not char*. A fix is attached.
>
> The standard says nothing special about char* here, it refers to accesses
> being by an lvalue expression that has "a character type". (C99 6.5#7
> bullet 6.) The accesses in your example are by such lvalue expressions.
Sorry, I don't have access to the standard and I don't quite
understand what you are saying.
Are you saying that the MEMs that access the char fields in my example
need to be in alias set 0?