re PR tree-optimization/62091 (ice in before_dom_children)
PR tree-optimization/62091 * g++.dg/ipa/devirt-39.C: New. From-SVN: r214209
This commit is contained in:
parent
7351b44f25
commit
8714cbc5c7
1 changed files with 29 additions and 0 deletions
29
gcc/testsuite/g++.dg/ipa/devirt-39.C
Normal file
29
gcc/testsuite/g++.dg/ipa/devirt-39.C
Normal file
|
@ -0,0 +1,29 @@
|
|||
// PR c++/61214
|
||||
/* { dg-options "-O2 -fdump-tree-optimized" } */
|
||||
|
||||
struct Base
|
||||
{
|
||||
virtual ~Base();
|
||||
virtual Base* clone() {
|
||||
return 0;
|
||||
}
|
||||
};
|
||||
|
||||
struct Foo : Base
|
||||
{
|
||||
virtual ~Foo();
|
||||
virtual Base* clone() {
|
||||
return new Foo();
|
||||
}
|
||||
};
|
||||
|
||||
int main()
|
||||
{
|
||||
Base* f = new Foo();
|
||||
f->clone();
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* { dg-final { scan-tree-dump-not "OBJ_TYPE_REF" "optimized" } } */
|
||||
/* { dg-final { scan-assembler-not "_ZN3Foo5cloneEv" } } */
|
||||
/* { dg-final { cleanup-tree-dump "optimized" } } */
|
Loading…
Add table
Reference in a new issue