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

--- Comment #12 from Bernd Edlinger <bernd.edlinger at hotmail dot de> ---
I think it is normal, that A's vptr is initialized first to
an A which means that f points to A::f and i points to A::i.
these overloads are usable while A's constructor runs.
The vptr is later changed to the overloads that B defines,
so f points to B::f, while B's constructor runs and finally
f points to C::f while and after C's constructor finished.

I think we should not erase A's vptr again to zero after
A's constructor has run, A is now fully constructed.
All that changes is, if f points to A::f, or B::f, or C::f.
That is why the vptr is repeatedly written.

So I still think that my patch would do the right thing,
even when I try the new test cases.

Reply via email to