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

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc1/] [gcc/] [testsuite/] [g++.dg/] [inherit/] [using2.C] - Diff between revs 301 and 338

Only display areas with differences | Details | Blame | View Log

Rev 301 Rev 338
// { dg-do run }
// { dg-do run }
// Copyright (C) 2002 Free Software Foundation, Inc.
// Copyright (C) 2002 Free Software Foundation, Inc.
// Contributed by Nathan Sidwell 15 Sep 2002 
// Contributed by Nathan Sidwell 15 Sep 2002 
// PR 7919. Methods found via using decls didn't have their this
// PR 7919. Methods found via using decls didn't have their this
// pointers converted to the final base type.
// pointers converted to the final base type.
struct Base {
struct Base {
  int m;
  int m;
  protected:
  protected:
  void *Return () { return this; }
  void *Return () { return this; }
};
};
struct Derived : Base {
struct Derived : Base {
  using Base::Return;
  using Base::Return;
  virtual ~Derived () {}
  virtual ~Derived () {}
};
};
int main ()
int main ()
{
{
  Derived d;
  Derived d;
  return static_cast  (&d) != d.Return ();
  return static_cast  (&d) != d.Return ();
}
}
 
 

powered by: WebSVN 2.1.0

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