1/* { dg-do compile } */ 2/* { dg-options "-g" } */ 3 4template <class T> 5static inline bool Dispatch (T* obj, void (T::*func) ()) 6{ 7 (obj->*func) (); 8} 9class C 10{ 11 bool f (int); 12 void g (); 13}; 14bool C::f (int n) 15{ 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 } 24} 25void C::g () 26{ 27 for (;;) { } 28} 29 30