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

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc1/] [gcc/] [testsuite/] [g++.dg/] [tree-ssa/] [pr8781.C] - Blame information for rev 338

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 301 jeremybenn
/* { dg-do compile } */
2
/* { dg-options "-O -fdump-tree-fre-details" } */
3
 
4
int f();
5
 
6
template
7
class noop_t {
8
    const predicate &pred;
9
public:
10
    explicit noop_t(const predicate &p) : pred(p) {}
11
 
12
    int operator()() const { return pred(); }
13
};
14
 
15
template
16
inline noop_t noop(const predicate pred) {
17
    return noop_t(pred);
18
}
19
 
20
int x()
21
{
22
  return (noop(noop(noop(noop(noop(noop(noop(noop(noop(f)))))))))());
23
}
24
 
25
/* We should optimize this to a direct call.  */
26
 
27
/* { dg-final { scan-tree-dump "Replacing call target with f" "fre" } } */
28
/* { dg-final { cleanup-tree-dump "fre" } } */

powered by: WebSVN 2.1.0

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