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: "bernd.edlinger at hotmail dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 28 Feb 2017 09:48:56 +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 #24 from Bernd Edlinger <bernd.edlinger at hotmail dot de> ---
(In reply to Richard Biener from comment #23)
> (In reply to Bernd Edlinger from comment #22)
> > (In reply to Jakub Jelinek from comment #20)
> > > which fails also on x86_64-linux at -O2. And that testcase regressed with
> > > r223126. Now whether this is valid C++, no idea, placement new is messy.
> >
> > This test case can't be valid, suppose the A has a copy constructor
> > that that is also not called when B is moved around.
>
> The canonical fix is to put the type you placement new into the union storage
> into the union as regular member rather than having a char[] member in the
> union.
Yes. Of course you cannot put a non-POD type in a union,
but maybe a pointer to A, that is probably what boost should
do in their functor class.