OpenCores
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 715

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

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.