1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
// { dg-do assemble } // { dg-options "-O2 -Wall" } // GROUPS passed warnings template<class T> class X { public: void kill(unsigned i) { vec[i].~T(); } T *vec; }; class Y { }; void x() { X<int> x; x.kill(0); X<Y> y; y.kill(0); }