------- Comment #3 from reichelt at gcc dot gnu dot org 2009-04-29 08:58
-------
Shorter testcase, which still includes <map>, though.
It crashes with "-O" and above:
==================================================
#include<map>
struct A
{
virtual ~A() {}
};
struct B : A
{
virtual ~B() { foo(); }
void foo();
};
struct C : B
{
C();
C(const C& c) : B(c) { foo(); }
virtual ~C();
};
void bar(std::map<int, C> m)
{
m.insert(std::pair<int, C>(0, C()));
}
==================================================
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39862