URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Subversion Repositories openrisc
[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [g++.old-deja/] [g++.ext/] [return1.C] - Rev 149
Go to most recent revision | Compare with Previous | Blame | View Log
// { dg-do assemble }
// { dg-options "-Wno-deprecated" }
// Test that the named return value extension works when passed as a reference.
// Origin: Jason Merrill <jason@redhat.com>
void f (int &i)
{
i = 42;
}
int g () return r // { dg-error "" } named return value
{
f (r); // { dg-error "" } undeclared
}
int main ()
{
int i = g ();
return (i != 42);
}
Go to most recent revision | Compare with Previous | Blame | View Log