PR c++/81917 - ICE with void_t and partial specialization.
[official-gcc.git] / gcc / testsuite / g++.dg / opt / vt4.C
blob98378da00f1e44464fc3115c8629c17f90965baf
1 // PR c++/50243
2 // { dg-do compile }
3 // { dg-options "-O" }
4 // { dg-add-options bind_pic_locally }
5 // { dg-final { scan-assembler-not "_ZTV.A" } }
7 void foo ();
9 struct A
11   ~A () { }
12   virtual void a () = 0;
13   virtual void b () = 0;
14   virtual void c () = 0;
17 struct B : public A
19   ~B () { foo (); }
20   void a () { foo (); }
21   void b () { foo (); }
22   void c () { delete this; }
25 void
26 test ()
28   A *y = new B ();
29   y->a ();
30   y->b ();
31   y->c ();