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.2.2/] [gcc/] [testsuite/] [g++.old-deja/] [g++.other/] [overload7.C] - Rev 149
Go to most recent revision | Compare with Previous | Blame | View Log
// { dg-do run }
// Check that object call works when there are multiple conversion ops
// returning the same type.
typedef int (*pfn)();
int zero () { return 0; }
int one () { return 1; }
int two () { return 2; }
struct A {
A() { }
operator pfn () { return one; }
operator pfn () const { return zero; }
operator pfn () volatile { return two; }
};
int
main ()
{
const A a;
return a();
}
Go to most recent revision | Compare with Previous | Blame | View Log