This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/79671] [7 Regression] mapnik miscompilation on armv7hl since r235622
- From: "redi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 24 Mar 2017 18:00:08 +0000
- Subject: [Bug target/79671] [7 Regression] mapnik miscompilation on armv7hl since r235622
- Auto-submitted: auto-generated
- References: <bug-79671-4@http.gcc.gnu.org/bugzilla/>
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.