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
* auto-profile.c (afdo_annotate_cfg): Use update_max_bb_count.
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
opt
/
pr61456.C
blob
51a1e618cb329ce31dec1fa1b307652fed7f9c8f
1
// { dg-do compile }
2
// { dg-options "-O2 -std=c++11 -Werror=uninitialized" }
3
4
int rand ();
5
6
class Funcs
7
{
8
public:
9
int *f1 ();
10
int *f2 ();
11
};
12
typedef decltype (&Funcs::f1) pfunc;
13
14
static int Set (Funcs * f, const pfunc & fp)
15
{
16
(f->*fp) ();
17
return 0;
18
}
19
20
void
21
Foo ()
22
{
23
pfunc fp = &Funcs::f1;
24
if (rand ())
25
fp = &Funcs::f2;
26
Set (0, fp);
27
}