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

--- Comment #42 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Richard Biener from comment #14)
> Seems to be
> 
>     void move_assign(function10& f)
>     {
>       if (&f == this)
>         return;
> 
>       { try {
>         if (!f.empty()) {
>           this->vtable = f.vtable;
>           if (this->has_trivial_copy_and_destroy())
>             this->functor = f.functor;
> ^^^
> 
> for the aggregate copy but lineno info looks confused for the aliasing store.

Changing this aggregate copy to:

    __builtin_memcpy(&this->functor, &f.functor, sizeof(f.functor));

fixes the crash on armv7hl.

No amount of may_alias attributes on the definition of the union
detail::function::function_buffer type helped.

Reply via email to