URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 305 |
Rev 338 |
// { dg-do run }
|
// { dg-do run }
|
// prms-id: 5718
|
// prms-id: 5718
|
|
|
class Base {
|
class Base {
|
int i;
|
int i;
|
public:
|
public:
|
Base() { i = 42; }
|
Base() { i = 42; }
|
};
|
};
|
|
|
|
|
class Mixin {
|
class Mixin {
|
int j;
|
int j;
|
public:
|
public:
|
Mixin() { j = 42; }
|
Mixin() { j = 42; }
|
};
|
};
|
|
|
|
|
class Derived : public Base, public Mixin {
|
class Derived : public Base, public Mixin {
|
public:
|
public:
|
Derived() { }
|
Derived() { }
|
Derived & operator=(Mixin & m) { return *this; }
|
Derived & operator=(Mixin & m) { return *this; }
|
};
|
};
|
|
|
|
|
void
|
void
|
testFunct(Derived * arg) {
|
testFunct(Derived * arg) {
|
Mixin temp;
|
Mixin temp;
|
|
|
(Mixin &)(*arg) = temp; // { dg-bogus "" }
|
(Mixin &)(*arg) = temp; // { dg-bogus "" }
|
}
|
}
|
|
|
|
|
int
|
int
|
main(int argc, char *argv[]) {
|
main(int argc, char *argv[]) {
|
Derived temp;
|
Derived temp;
|
|
|
testFunct(&temp);
|
testFunct(&temp);
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.