aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.old-deja/g++.mike/p5718.C
blob: d0acbb9bdab9ee80ef96948c34c7bd0441f8e99d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
// { dg-do run  }
// prms-id: 5718

class Base {
  int i;
public:
  Base() { i = 42; }
};


class Mixin {
  int j;
public:
  Mixin() { j = 42; }
};


class Derived : public Base, public Mixin {
public:
  Derived() { }
  Derived & operator=(Mixin & m) { return *this; }
};


void
testFunct(Derived * arg) {
  Mixin temp;

  (Mixin &)(*arg) = temp;		// { dg-bogus "" }  
}


int
main(int argc, char *argv[]) {
  Derived temp;

  testFunct(&temp);
}