------- Additional Comments From joseph at codesourcery dot com 2005-06-30 09:27 ------- Subject: Re: [4.0/4.1 Regression] struct copy inlining generates overlapping memcpy
On Thu, 30 Jun 2005, pinskia at gcc dot gnu dot org wrote: > I think this is a latent bug as even 3.4 produces calls to memcpy. Those are memcpy via a stack temporary (each of pq and qp calls memcpy twice), which is OK. The problem is that 4.0/4.1 use a direct memcpy between the overlapping structures. Either indirect copying as with 3.4, or using memmove, would be OK, but you can't just convert t = s1 s2 = t into s2 = s1 if s1 and s2 might overlap. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22237