OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.old-deja/] [g++.other/] [access7.C] - Blame information for rev 699

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 699 jeremybenn
// { dg-do assemble  }
2
// Test that access control for types and statics works properly
3
// with nested types.
4
 
5
 
6
class A {
7
  static int I1;                // { dg-error "" } private
8
  struct B1 { };                // { dg-error "" } private
9
public:
10
  static int I2;
11
  struct B2 { };
12
};
13
 
14
class D: public A {
15
  struct E {
16
    void f ();
17
  };
18
};
19
 
20
void D::E::f ()
21
{
22
  int i = I1;                   // { dg-error "" } within this context
23
  B1 b1;                        // { dg-error "" } within this context
24
  i = I2;
25
  B2 b2;
26
}
27
 
28
void f ()
29
{
30
  A::B1 b1;                     // { dg-error "" } within this context
31
  new A::B1;                    // { dg-error "" } within this context
32
  (A::B1) b1;                   // { dg-error "" } within this context
33
}

powered by: WebSVN 2.1.0

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