[Bug rtl-optimization/23561] nonoverlapping_memrefs_p returns true even for overlapping memory references
pinskia at physics dot uc dot edu
gcc-bugzilla@gcc.gnu.org
Thu Aug 25 16:11:00 GMT 2005
------- Additional Comments From pinskia at physics dot uc dot edu 2005-08-25 15:53 -------
Subject: Re: nonoverlapping_memrefs_p returns true even for overlapping memory references
>
>
> ------- Additional Comments From jakub at gcc dot gnu dot org 2005-08-25 15:47 -------
> > That is invalid as a.a2 is only 5 in size and "HELLO" is 6 in size.
> I know it overlaps into the next field. Whether it is invalid is unclear to me.
> How about memcpy ((char *) &a + offsetof (struct A, a2), "HELLO", 6)?
> Is there supposed to be any semantic difference between the 2?
yes because one talks about the object a and the other one talks about the object
a.a2.
This is at least as I understand what the C standard says.
-- Pinski
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23561
More information about the Gcc-bugs
mailing list