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.0rc3/] [gcc/] [testsuite/] [g++.dg/] [warn/] [return-reference.C] - Rev 516
Compare with Previous | Blame | View Log
// { dg-do compile }
const int* bar();
const int&
foo1()
{
static int empty;
const int* x = bar();
return (x ? *x : empty); // { dg-bogus ".*" "" { xfail *-*-* } }
}
const int&
foo2()
{
static int empty;
const int* x = bar();
const int& r = (x ? *x : empty);
return (r);
}