Hi, the testcase would be wonderful - those bugs are hard to catch. I fixed some issues recently, so you may try recent snapshot if you didn't. You may try -fno-devirtualize to see if the bug goes away (likely it will) and you may try to look in -fdump-tree-all -fdump-ipa-all dumps where cxa_pure_virtual call appears in the program and send me some context.
Honza > Hi Jan, > > I hope to report a bug soon, but in the meantime I wanted to let > you know that for the last month or so, the 4.9 branch has (I think) > a bug at O3, where my program gets: > > pure virtual method called > terminate called without an active exception > Aborted > > 4.8 works fine. > > I am guessing this is related to your devirt work. I haven't > been able to produce a reduce testcase yet (sorry!), but here is > some code that illustrates the C++ type for the object whose virtual > table is (?) messed up. (Note: this code compiles but does NOT > crash.) > > Again, sorry for not having a testcase. I'll make one soon. > Hopefully it is helpful to know that bugs still exist. > > -BenRI > > #include <vector> > > class Object > { > virtual Object* clone() const =0; > }; > > template <typename T> > class Box: public Object, public T > { > public: > Box<T>* clone() const {return new Box<T>(*this);} > }; > > template <typename T> > using Vector = Box<std::vector<T>>; > > int main() > { > Vector<int> v; > v.clone(); > } > > -BenRI > > P.S. The bug exists in debian gcc snapshots taken on 2014-02-12 and > 2014-01-22, Linux AMD64.