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

--- Comment #26 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Richard Biener from comment #6)
> We should at least make sure to use memcpy for the array part in
> 
> struct {
>   volatile int i;
>   int a[100000];
> } a, b;
> a = b;
> 
> do we really want to blow up code-size (and compile-time) for

(and stack in some cases).  See
https://github.com/llvm/llvm-project/issues/118149#issuecomment-2710308402
which shows that clang will place sometimes the full object on the stack and
then do a copy of part of it using load/store (for the volatile part) and then
memcpy for the rest. instead of just using the volatile part of the stack only.

Reply via email to