Debian Codegraph @

gcc/testsuite/g++.dg/torture/pr49615.C

raw
1 /* { dg-do compile } */
2 /* { dg-options "-g" } */
3
4 template <class T>
5 static inline bool Dispatch (T* obj, void (T::*func) ())
6 {
7 (obj->*func) ();
8 return true;
9 }
10 class C
11 {
12 bool f (int);
13 void g ();
14 };
15 bool C::f (int n)
16 {
17 bool b;
18 switch (n)
19 {
20 case 0:
21 b = Dispatch (this, &C::g);
22 case 1:
23 b = Dispatch (this, &C::g);
24 }
25
26 return true;
27 }
28 void C::g ()
29 {
30 for (;;) { }
31 }
32