OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc1/] [gcc/] [testsuite/] [g++.old-deja/] [g++.mike/] [p5718.C] - Diff between revs 305 and 338

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);
}
}
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.