http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47409

--- Comment #8 from joseph at codesourcery dot com <joseph at codesourcery dot 
com> 2011-01-25 17:04:24 UTC ---
On Tue, 25 Jan 2011, rguenth at gcc dot gnu.org wrote:

> do we really want to blow up code-size (and compile-time) for
> 
> struct {
>   volatile int a[1000000];
> } a, b;
> a = b;
> 
> ?  And what's the difference of the above to
> 
> volatile struct {
>   int a[1000000];
> } a, b;
> a = b;
> 
> ?

I think these are much the same - and of course an inline loop would be 
better than blowing up code size with separate instructions for each int.  
If in doubt, be conservative about the volatile values possibly being in 
some special kind of mapped memory that memcpy/memmove may not work with 
(and where certainly there should be exactly the correct number of reads 
and writes of each memory location).

Reply via email to