blob: 923c98e92eb94e83a0bfd7f77e38fee69f124886 [file] [log] [blame]
/* { dg-do run } */
/* Call to foo should be devirtualized because there are no derived types of A. */
/* { dg-options "-O2 -fdump-tree-ssa" } */
namespace {
class A {
public:
virtual int foo(void)
{
return 0;
}
};
}
class A a, *b=&a;
int main()
{
return b->foo();
}
/* { dg-final { scan-tree-dump-times "OBJ_TYPE_REF" 0 "ssa"} } */