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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [tree-ssa/] [pr40874.C] - Blame information for rev 742

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

Line No. Rev Author Line
1 693 jeremybenn
// { dg-do compile }
2
// { dg-options "-O -fdump-tree-optimized" }
3
 
4
struct pf
5
{
6
  inline pf(int(*x)(int)) : x(x) {}
7
 
8
  inline int operator()(int a) const
9
    {
10
      return x(a);
11
    }
12
 
13
  int (*x)(int);
14
};
15
 
16
inline int g(int x) { return x/x - 1; }
17
 
18
int main(int argc, char* argv[])
19
{
20
  pf f(g);
21
  return f(3);
22
}
23
 
24
// { dg-final { scan-tree-dump "return 0" "optimized" } }
25
// { dg-final { cleanup-tree-dump "optimized" } }

powered by: WebSVN 2.1.0

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