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++.jason/] [const4.C] - Blame information for rev 305

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 305 jeremybenn
// { 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
}

powered by: WebSVN 2.1.0

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