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
/
vect
/
pr60836.cc
blob
b2d66ec5b15299b09c5dfcdbbbf9f4daf1f91dda
1
// { dg-do compile }
2
3
int
a
,
b
;
4
typedef
double
(*
NormFunc
) (
const int
&);
5
int
&
6
max
(
int
&
p1
,
int
&
p2
)
7
{
8
if
(
p1
<
p2
)
9
return
p2
;
10
return
p1
;
11
}
12
13
struct
A
14
{
15
int
operator
() (
int
p1
,
int
p2
)
16
{
17
return
max
(
p1
,
p2
);
18
}
19
};
20
template
<
class
,
class
>
double
21
norm_
(
const int
&)
22
{
23
char
c
,
d
;
24
A e
;
25
for
(;
a
;
a
++)
26
{
27
b
=
e
(
b
,
d
);
28
b
=
e
(
b
,
c
);
29
}
30
31
return
0.0
;
32
}
33
34
void
35
norm
()
36
{
37
static
NormFunc f
=
norm_
<
int
,
A
>;
38
f
=
0
;
39
}
40