summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/torture/pr49615.C
blob: 98a2f95b8b3f1659ac62beca942d57d5e737dee1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/* { dg-do compile } */
/* { dg-options "-g" } */

template <class T>
static inline bool Dispatch (T* obj, void (T::*func) ())
{
  (obj->*func) ();
}
class C
{
  bool f (int);
  void g ();
};
bool C::f (int n)
{
  bool b;
  switch (n)
    {
      case 0:
	  b = Dispatch (this, &C::g);
      case 1:
	  b = Dispatch (this, &C::g);
    }
}
void C::g ()
{
  for (;;) { }
}