Remove old autovect-branch by moving to "dead" directory.
[official-gcc.git] / old-autovect-branch / gcc / testsuite / g++.old-deja / g++.jason / crash4.C
blob00ba0cc0644e4ad708f24fb1191fa532f85619a3
1 // { dg-do assemble  }
2 // PRMS Id: 4346
3 // Bug: g++ dies on redefinition of cc_Array::repInvariant.
5 class ccObjectInfo
7 public:
8     virtual const ccObjectInfo& repInvariant (int =0) const;
9 };
11 template <class T>
12 class cc_Array : public ccObjectInfo
14 public:
15   virtual const ccObjectInfo& repInvariant (int =0) const ;
18 template <class T>
19 const ccObjectInfo& cc_Array<T>::repInvariant(int) const  // { dg-error "previously declared" }
20 {  return *this /* *this is required here */; }
22 template <class T>
23 class ccArray :public ccObjectInfo
25   ccArray (cc_Array<T>*);
28 template <class T>
29 class ccObjArray : public ccArray<T>
31   ccObjArray();
32 }; 
34 template <class T>
35 const ccObjectInfo& cc_Array<T>::repInvariant(int) const // { dg-error "redefinition" }
36 {  return 0; }
38 typedef ccObjArray< double>     ccROIRuns;