blob: bb5ce66f512431eb2e1ada30d88fe13f3dc36c60 [file] [log] [blame]
// 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" } } */