repo.or.cz
/
gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Fortran: Fix PR 47485.
[gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
torture
/
pr49615.C
blob
bc5182b2716d2bd176fe8ca80fa8cbf7e56f5f3b
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