111
|
1 // { dg-do run }
|
|
2 // prms-id: 5718
|
|
3
|
|
4 class Base {
|
|
5 int i;
|
|
6 public:
|
|
7 Base() { i = 42; }
|
|
8 };
|
|
9
|
|
10
|
|
11 class Mixin {
|
|
12 int j;
|
|
13 public:
|
|
14 Mixin() { j = 42; }
|
|
15 };
|
|
16
|
|
17
|
|
18 class Derived : public Base, public Mixin {
|
|
19 public:
|
|
20 Derived() { }
|
|
21 Derived & operator=(Mixin & m) { return *this; }
|
|
22 };
|
|
23
|
|
24
|
|
25 void
|
|
26 testFunct(Derived * arg) {
|
|
27 Mixin temp;
|
|
28
|
|
29 (Mixin &)(*arg) = temp; // { dg-bogus "" }
|
|
30 }
|
|
31
|
|
32
|
|
33 int
|
|
34 main(int argc, char *argv[]) {
|
|
35 Derived temp;
|
|
36
|
|
37 testFunct(&temp);
|
|
38 }
|