repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
2014-04-07 Charles Baylis <charles.baylis@linaro.org>
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
torture
/
pr49615.C
blob
98a2f95b8b3f1659ac62beca942d57d5e737dee1
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
}
9
class C
10
{
11
bool f (int);
12
void g ();
13
};
14
bool 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
}
25
void C::g ()
26
{
27
for (;;) { }
28
}
29