http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54770
--- Comment #8 from Andy Jost <andy.m.jost at gmail dot com> 2012-11-20
17:14:18 UTC ---
The workaround I mentioned in comment #5 does seem to do the trick.
Specifically, something like this works in all the cases I've tried:
struct MainNode : Node
{
virtual void H()
{
helper()
this->H();
}
__attribute__((noinline)) void helper()
{
NodePtr tmp(arg);
this->~Node();
new(this) MainNode(tmp);
}
};
