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
c++: constantness of call to function pointer [PR111703]
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
torture
/
pr64378.C
blob
4d48cdc0946503123d03032c5edb3d6bbc21a72d
1
// { dg-do compile }
2
// { dg-options "-fno-ipa-cp" }
3
struct data {
4
data(int) {}
5
};
6
7
struct top {
8
virtual int topf() { return 0; }
9
};
10
11
struct child1: top {
12
void childf()
13
{
14
data d(topf());
15
}
16
};
17
18
void test(top *t)
19
{
20
child1 *c = static_cast<child1 *>(t);
21
c->childf();
22
child1 d;
23
test(&d);
24
}