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
2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git]
/
gcc
/
testsuite
/
g++.old-deja
/
g++.jason
/
const4.C
blob
d29c46b74255cb3bc49d8460fcef8eaac801e445
1
// { dg-do assemble }
2
// PRMS Id: 8927
3
// Bug: complex inheritance interferes with const checking
4
5
class GrandParent {
6
public:
7
virtual void DoIt();
8
protected:
9
int A;
10
};
11
12
class Parent : virtual public GrandParent {
13
public:
14
virtual void DoX() const;
15
};
16
17
class Child : public Parent {
18
public:
19
void DoX() const;
20
};
21
22
void Child::DoX() const
23
{
24
A = 10; // { dg-error "" } assignment to const
25
}