URL
https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 149 |
Rev 154 |
// { dg-do run }
|
// { dg-do run }
|
// Check that object call works when there are multiple conversion ops
|
// Check that object call works when there are multiple conversion ops
|
// returning the same type.
|
// returning the same type.
|
|
|
typedef int (*pfn)();
|
typedef int (*pfn)();
|
|
|
int zero () { return 0; }
|
int zero () { return 0; }
|
int one () { return 1; }
|
int one () { return 1; }
|
int two () { return 2; }
|
int two () { return 2; }
|
|
|
struct A {
|
struct A {
|
A() { }
|
A() { }
|
operator pfn () { return one; }
|
operator pfn () { return one; }
|
operator pfn () const { return zero; }
|
operator pfn () const { return zero; }
|
operator pfn () volatile { return two; }
|
operator pfn () volatile { return two; }
|
};
|
};
|
|
|
int
|
int
|
main ()
|
main ()
|
{
|
{
|
const A a;
|
const A a;
|
return a();
|
return a();
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.