OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [parse/] [pr37862.C] - Rev 693

Compare with Previous | Blame | View Log

// { dg-do run }
#include <stdlib.h>

class A {
public:
  virtual void get (void) { }
};

class B : public A {
public:
  void get (void) { abort (); }
};

class C : public B { };

int main (void)
{
  C   c;
  C * p = &c;

  p->A::get (); 
  (p->A::get) ();       // The C++ parser used to resolve this to B::get()

  return 0;
}

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.