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
Remove old autovect-branch by moving to "dead" directory.
[official-gcc.git]
/
old-autovect-branch
/
gcc
/
testsuite
/
g++.old-deja
/
g++.jason
/
pmf7.C
blob
7601333842a33357c0d9f4db64aa2ac803a69967
1
// { dg-do run }
2
// PRMS Id: 6486
3
// Make sure that no confused handling of COND_EXPRs and SAVE_EXPRs messes
4
// with the number of calls to foo.
5
6
int c;
7
8
struct A {
9
void f () {}
10
virtual void g () {}
11
};
12
13
A& foo ()
14
{
15
static A a;
16
++c;
17
return a;
18
}
19
20
int main ()
21
{
22
void (A::*p)() = &A::f;
23
(foo ().*p)();
24
p = &A::g;
25
(foo ().*p)();
26
27
return 2 - c;
28
}