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
Fix type in the changelog entry,
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
ipa
/
devirt-39.C
blob
bb5ce66f512431eb2e1ada30d88fe13f3dc36c60
1
// PR c++/61214
2
/* { dg-options "-O2 -fdump-tree-optimized" } */
3
4
struct Base
5
{
6
virtual ~Base();
7
virtual Base* clone() {
8
return 0;
9
}
10
};
11
12
struct Foo : Base
13
{
14
virtual ~Foo();
15
virtual Base* clone() {
16
return new Foo();
17
}
18
};
19
20
int main()
21
{
22
Base* f = new Foo();
23
f->clone();
24
return 0;
25
}
26
27
/* { dg-final { scan-tree-dump-not "OBJ_TYPE_REF" "optimized" } } */
28
/* { dg-final { scan-assembler-not "_ZN3Foo5cloneEv" } } */