URL
https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 301 |
Rev 384 |
/* { dg-do compile } */
|
/* { dg-do compile } */
|
/* { dg-options "-O -fdump-tree-fre-details" } */
|
/* { dg-options "-O -fdump-tree-fre-details" } */
|
|
|
int f();
|
int f();
|
|
|
template
|
template
|
class noop_t {
|
class noop_t {
|
const predicate &pred;
|
const predicate &pred;
|
public:
|
public:
|
explicit noop_t(const predicate &p) : pred(p) {}
|
explicit noop_t(const predicate &p) : pred(p) {}
|
|
|
int operator()() const { return pred(); }
|
int operator()() const { return pred(); }
|
};
|
};
|
|
|
template
|
template
|
inline noop_t noop(const predicate pred) {
|
inline noop_t noop(const predicate pred) {
|
return noop_t(pred);
|
return noop_t(pred);
|
}
|
}
|
|
|
int x()
|
int x()
|
{
|
{
|
return (noop(noop(noop(noop(noop(noop(noop(noop(noop(f)))))))))());
|
return (noop(noop(noop(noop(noop(noop(noop(noop(noop(f)))))))))());
|
}
|
}
|
|
|
/* We should optimize this to a direct call. */
|
/* We should optimize this to a direct call. */
|
|
|
/* { dg-final { scan-tree-dump "Replacing call target with f" "fre" } } */
|
/* { dg-final { scan-tree-dump "Replacing call target with f" "fre" } } */
|
/* { dg-final { cleanup-tree-dump "fre" } } */
|
/* { dg-final { cleanup-tree-dump "fre" } } */
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.