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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [g++.dg/] [tree-ssa/] [pr8781.C] - Rev 478

Go to most recent revision | Compare with Previous | Blame | View Log

/* { dg-do compile } */
/* { dg-options "-O -fdump-tree-fre-details" } */

int f();

template<typename predicate>
class noop_t {
    const predicate &pred;
public:
    explicit noop_t(const predicate &p) : pred(p) {}

    int operator()() const { return pred(); }
};

template<typename predicate>
inline noop_t<predicate> noop(const predicate pred) {
    return noop_t<predicate>(pred);
}

int x()
{
  return (noop(noop(noop(noop(noop(noop(noop(noop(noop(f)))))))))());
}

/* We should optimize this to a direct call.  */

/* { dg-final { scan-tree-dump "Replacing call target with f" "fre" } } */
/* { dg-final { cleanup-tree-dump "fre" } } */

Go to most recent revision | Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

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