URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Subversion Repositories openrisc
[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [other/] [final1.C] - Rev 801
Go to most recent revision | Compare with Previous | Blame | View Log
/* Verify that final methods are devirtualized */
/* { dg-do compile } */
/* { dg-options "-fdump-tree-original -std=c++0x" } */
struct A final
{
virtual void foo ()
{
}
};
struct B
{
virtual void foo () final
{
}
};
void fun(A* a, B* b)
{
a->foo();
b->foo();
}
/* { dg-final { scan-tree-dump-times "A::foo" 2 "original" } } */
/* { dg-final { scan-tree-dump-times "B::foo" 2 "original" } } */
/* { dg-final { cleanup-tree-dump "original" } } */
Go to most recent revision | Compare with Previous | Blame | View Log