URL
https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 305 |
Rev 338 |
// { dg-do run }
|
// { dg-do run }
|
// prms-id: 5840
|
// prms-id: 5840
|
|
|
class Signal {
|
class Signal {
|
public:
|
public:
|
int Name(void) { return 1; }
|
int Name(void) { return 1; }
|
};
|
};
|
|
|
class Derived : public Signal {
|
class Derived : public Signal {
|
public:
|
public:
|
int Name(void) { return 2; }
|
int Name(void) { return 2; }
|
};
|
};
|
|
|
template
|
template
|
class Bar
|
class Bar
|
{
|
{
|
public:
|
public:
|
int value (Foo* a) { return (a->*Id)(); }
|
int value (Foo* a) { return (a->*Id)(); }
|
};
|
};
|
|
|
/* The following line is illegal under the new rules for non-type
|
/* The following line is illegal under the new rules for non-type
|
template arguments in the standard, so it is commented out. */
|
template arguments in the standard, so it is commented out. */
|
/* template class Bar ; */
|
/* template class Bar ; */
|
template class Bar ;
|
template class Bar ;
|
template class Bar ;
|
template class Bar ;
|
|
|
Derived a;
|
Derived a;
|
|
|
/* Bar dispatcher1; */
|
/* Bar dispatcher1; */
|
Bar dispatcher2;
|
Bar dispatcher2;
|
|
|
int main() {
|
int main() {
|
/* int i1 = dispatcher1.value(&a); */
|
/* int i1 = dispatcher1.value(&a); */
|
int i2 = dispatcher2.value(&a);
|
int i2 = dispatcher2.value(&a);
|
return /* i1 != 1 || */ i2 != 2;
|
return /* i1 != 1 || */ i2 != 2;
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.