This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Aliasing problems in GNU Chill?
- To: dstarner98 at aasaa dot ofe dot org
- Subject: Re: Aliasing problems in GNU Chill?
- From: Jeffrey A Law <law at cygnus dot com>
- Date: Thu, 02 Sep 1999 00:43:26 -0600
- cc: gcc at gcc dot gnu dot org
- Reply-To: law at cygnus dot com
In message <19990901144104.A6143@x8b4e53cd.dhcp.okstate.edu>you write:
> I was reading through andps.c in libchill recently and came across this.
>
> else if (bitlength <= SET_SHORT_SIZE)
> {
> *((SET_SHORT *)out) = *((SET_SHORT *)left) &
> *((SET_SHORT *)right);
> MASK_UNUSED_SHORT_BITS((SET_SHORT *)out, bitlength);
> }
>
> It appears to me that this suffers from the same aliasing problems that
> we've been hearing about recently. No?
Yes.
I see libchill's bitset code is badly littered with this stuff. How
unpleasant.
Though it is unlikely to make a difference in this code as-is since there
are no real instruction reordering opportunities that would cause the the
scheduler to move instructions in an unsafe manner.
Still this code should be fixed. Do you want to work cleaning up this code?
jeff