URL
https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk
Go to most recent revision |
Only display areas with differences |
Details |
Blame |
View Log
Rev 149 |
Rev 154 |
/* { dg-do compile } */
|
/* { dg-do compile } */
|
/* { dg-options "-O -fdump-tree-optimized" } */
|
/* { dg-options "-O -fdump-tree-optimized" } */
|
|
|
template
|
template
|
struct Bar
|
struct Bar
|
{
|
{
|
int get() { return static_cast(this)->get2(); }
|
int get() { return static_cast(this)->get2(); }
|
};
|
};
|
struct Foo : public Bar
|
struct Foo : public Bar
|
{
|
{
|
int get2() { return x; }
|
int get2() { return x; }
|
int x;
|
int x;
|
};
|
};
|
|
|
int foo(Foo& f)
|
int foo(Foo& f)
|
{
|
{
|
return f.get();
|
return f.get();
|
}
|
}
|
|
|
/* { dg-final { scan-tree-dump "return f->x;" "optimized" } } */
|
/* { dg-final { scan-tree-dump "return f->x;" "optimized" } } */
|
/* { dg-final { cleanup-tree-dump "optimized" } } */
|
/* { dg-final { cleanup-tree-dump "optimized" } } */
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.