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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [g++.old-deja/] [g++.jason/] [scoping4.C] - Blame information for rev 154

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

Line No. Rev Author Line
1 149 jeremybenn
// { dg-do assemble  }
2
// PRMS Id: 4375
3
// Bug: g++ fails to keep track of nested typedefs properly.
4
 
5
class A {
6
public:
7
  typedef const char * Ptr;
8
  Ptr s;
9
  Ptr get_string();
10
  A(Ptr string); // { s = string; };
11
};
12
 
13
class B {
14
public:
15
  typedef A * Ptr;
16
  Ptr a;
17
  Ptr get_A();
18
  B(Ptr a_ptr);
19
};
20
 
21
A::A(Ptr string) {              // { dg-bogus "" }
22
  s = string;                   // { dg-bogus "" }
23
}
24
 
25
int main() {
26
  A a("testing");
27
  A *a_ptr;
28
  B b(&a);
29
  a_ptr = b.get_A();
30
}

powered by: WebSVN 2.1.0

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