URL
https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk
Subversion Repositories openrisc_2011-10-31
[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [g++.dg/] [torture/] [pr40102.C] - Rev 301
Compare with Previous | Blame | View Log
/* { dg-do compile } */
bool foo0(int) { return true; }
bool foo1();
struct A
{
A();
~A();
template<typename T> void bar1(T f)
{
if (f(0))
foo1();
}
template<typename T> void bar2(T);
};
template<typename T> void A::bar2(T f)
{
A a, b[1], *p;
while (foo1())
{
if (p)
++p;
if (p && foo1())
bar1(f);
if (p)
++p;
}
if (foo1())
bar1(f);
}
void baz()
{
A().bar2(foo0);
}