URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Subversion Repositories openrisc
[/] [openrisc/] [tags/] [gnu-dev/] [fsf-gcc-snapshot-1-mar-12/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [tree-ssa/] [pr40874.C] - Rev 847
Go to most recent revision | Compare with Previous | Blame | View Log
// { dg-do compile }
// { dg-options "-O -fdump-tree-optimized" }
struct pf
{
inline pf(int(*x)(int)) : x(x) {}
inline int operator()(int a) const
{
return x(a);
}
int (*x)(int);
};
inline int g(int x) { return x/x - 1; }
int main(int argc, char* argv[])
{
pf f(g);
return f(3);
}
// { dg-final { scan-tree-dump "return 0" "optimized" } }
// { dg-final { cleanup-tree-dump "optimized" } }
Go to most recent revision | Compare with Previous | Blame | View Log