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
* g++.dg/ipa/devirt-13.C: Update template.
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
ipa
/
devirt-13.C
blob
b338a4c34c23d2d29f8a3ad4f4446b1a537cbaf0
1
/* { dg-do run } */
2
/* Call to foo should be devirtualized because there are no derived types of A. */
3
/* { dg-options "-O2 -fdump-tree-ssa" } */
4
namespace {
5
class A {
6
public:
7
virtual int foo(void)
8
{
9
return 0;
10
}
11
};
12
}
13
class A a, *b=&a;
14
main()
15
{
16
return b->foo();
17
}
18
19
/* { dg-final { scan-tree-dump-times "OBJ_TYPE_REF" 0 "ssa"} } */
20
/* { dg-final { cleanup-tree-dump "ssa" } } */