URL
https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 149 |
Rev 154 |
// { 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 ();
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.