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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [g++.dg/] [inherit/] [using2.C] - Blame information for rev 816

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
// { dg-do run }
2
 
3
// Copyright (C) 2002 Free Software Foundation, Inc.
4
// Contributed by Nathan Sidwell 15 Sep 2002 
5
 
6
// PR 7919. Methods found via using decls didn't have their this
7
// pointers converted to the final base type.
8
 
9
struct Base {
10
  int m;
11
  protected:
12
  void *Return () { return this; }
13
};
14
 
15
struct Derived : Base {
16
  using Base::Return;
17
  virtual ~Derived () {}
18
};
19
 
20
int main ()
21
{
22
  Derived d;
23
 
24
  return static_cast  (&d) != d.Return ();
25
}

powered by: WebSVN 2.1.0

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