2014-04-07 Charles Baylis <charles.baylis@linaro.org>
[official-gcc.git] / gcc / testsuite / g++.dg / torture / pr49615.C
blob98a2f95b8b3f1659ac62beca942d57d5e737dee1
1 /* { dg-do compile } */
2 /* { dg-options "-g" } */
4 template <class T>
5 static inline bool Dispatch (T* obj, void (T::*func) ())
7   (obj->*func) ();
9 class C
11   bool f (int);
12   void g ();
14 bool C::f (int n)
16   bool b;
17   switch (n)
18     {
19       case 0:
20           b = Dispatch (this, &C::g);
21       case 1:
22           b = Dispatch (this, &C::g);
23     }
25 void C::g ()
27   for (;;) { }