OSDN Git Service

Add NIOS2 support. Code from SourceyG++.
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.old-deja / g++.jason / 3523.C
1 // { dg-do assemble  }
2 // GROUPS passed assignment
3 class ccUnwind 
4 {
5 public:
6     virtual ~ccUnwind (); // comment out virtual, and void diag changes
7 };
8
9 template<class T>
10 class ccHandle : public ccUnwind // similarly comment out inheritance
11 {   
12 public:
13     ccHandle& operator = (const ccHandle& h);
14 };
15
16 class cc_Image;          
17
18 class ccImage : public ccHandle<cc_Image>
19 {
20 public:
21 //  reversing the order of the next two lines changes the diagnostic
22 //  printed about the def of ccDisplay::image 
23     ccImage    (const  ccImage  &);
24     ccImage    (const  cc_Image &);
25 };
26
27 class ccDisplay 
28 {
29 public:
30     ccImage img;
31 //ccImage image ( ccImage i) {img = i; return img;}
32 // above line  compiles 
33     ccImage image ( ccImage i) { return img = i;} /* this gets void* error */
34 };
35
36
37
38 // vd.C: In method `class ccImage ccDisplay::image (class ccImage)':
39 // vd.C:31: bad argument 1 for function `ccImage::ccImage (const class cc_Image&)' (type was void *)
40 // vd.C:31: in base initialization for class `ccImage'