Dead
[official-gcc.git] / gomp-20050608-branch / gcc / testsuite / g++.old-deja / g++.jason / synth10.C
blobf6181dc7c72c12e6c7b17da660ec3db13438c6f7
1 // { dg-do assemble  }
2 // { dg-options "-O" }
3 // Bug: Synthesizing methods for the nested class screwed up current_class_decl
4 // for the outer class.
6 class A;
7 class AH
9   public:
10     AH (   A * p = 0 );
11     AH ( const  AH & from )
12     : pointer( from.pointer )   { inc(); }
13     ~ AH ()  { dec(); }
14   private:
15     A * pointer;
16     void inc() const;
17     void dec() const;
20 class A 
22   protected:
23     struct AttrTable
24     {
25         struct Row
26         {
27         };
28     };
29     
30   public:
32     class Attributes
33     {
34       public:
35         class iterator
36         {
37           public:
38             iterator() : mo(0), attr(0) {}
39             iterator& operator++() { ++attr; return *this; }
40             iterator operator++(int)
41             { iterator tmp = *this; ++*this; return tmp; }
43           private:
44             AH mo;
45             const AttrTable::Row* attr;
46         };
48         Attributes(AH mo)
49         : mo(mo) {}
50         AH mo;
51     };