repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
FSF GCC merge 02/23/03
[official-gcc.git]
/
gcc
/
testsuite
/
g++.old-deja
/
g++.mike
/
p5718.C
blob
8858d389ef772874c103710f78058ef23d371544
1
// prms-id: 5718
2
3
class Base {
4
int i;
5
public:
6
Base() { i = 42; };
7
};
8
9
10
class Mixin {
11
int j;
12
public:
13
Mixin() { j = 42; }
14
};
15
16
17
class Derived : public Base, public Mixin {
18
public:
19
Derived() { };
20
Derived & operator=(Mixin & m) { return *this; };
21
};
22
23
24
void
25
testFunct(Derived * arg) {
26
Mixin temp;
27
28
(Mixin &)(*arg) = temp; // gets bogus error
29
}
30
31
32
int
33
main(int argc, char *argv[]) {
34
Derived temp;
35
36
testFunct(&temp);
37
}