Re: primary vtable not initialized properly

2011-08-12 Thread Jason Merrill
On 08/11/2011 08:06 PM, Xinliang David Li wrote: A new patch with lightly modified the test case. if (lost) BV_LOST_PRIMARY (*virtuals) = true; + else +BV_LOST_PRIMARY (*virtuals) = false; Might as well just do BV_LOST_PRIMARY (*virtuals) = lost; OK for trunk and 4.6 with that

Re: primary vtable not initialized properly

2011-08-11 Thread Xinliang David Li
A new patch with lightly modified the test case. David On Thu, Aug 11, 2011 at 5:02 PM, Xinliang David Li wrote: > Compile the following program using 4.6 or trunk compiler and run it, > the program will seg fault. The problem is that the D3_Spec's primary > vtable has a null entry for virtual f

primary vtable not initialized properly

2011-08-11 Thread Xinliang David Li
Compile the following program using 4.6 or trunk compiler and run it, the program will seg fault. The problem is that the D3_Spec's primary vtable has a null entry for virtual function id which it overrides. The root cause is that the base class's virtual function list for the derived class is cop