2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.jason / scoping4.C
blob54f5b67b7557a38ee7b852754aeea08d36b4e832
1 // { dg-do assemble  }
2 // PRMS Id: 4375
3 // Bug: g++ fails to keep track of nested typedefs properly.
5 class A {
6 public:
7   typedef char * Ptr;
8   Ptr s;
9   Ptr get_string();
10   A(Ptr string); // { s = string; };
13 class B {
14 public:
15   typedef A * Ptr;
16   Ptr a;
17   Ptr get_A();
18   B(Ptr a_ptr);
21 A::A(Ptr string) {              // { dg-bogus "" } 
22   s = string;                   // { dg-bogus "" } 
25 int main() {
26   A a("testing");
27   A *a_ptr;
28   B b(&a);
29   a_ptr = b.get_A();