1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
// { dg-do assemble } #define CRASH 1 #ifdef CRASH #define VIRTUAL virtual #else #define VIRTUAL #endif class A {}; class B : public VIRTUAL A {}; template <class Imp> class C : public /*virtual*/ Imp {}; // define CRASH and uncomment here ^^^^^^^^^^^ // and the crash goes away!!!! template class C<B>;