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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.old-deja/] [g++.jason/] [trivial.C] - Blame information for rev 699

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 699 jeremybenn
// { dg-do assemble  }
2
// PRMS Id: 3665
3
 
4
//-------------------------------------------------------------
5
//  Referential declaration within class
6
//
7
//  Imbeded below is the invocation of the compiler and the error
8
//  message
9
//
10
//  This compiles successfully with both the xlC and CFRONT compilers
11
//  This was reviewed with Clem Dickey and we agree that it appears to
12
//  be a Cygnus compiler problem.
13
//-------------------------------------------------------------
14
/*
15
$ make bug.reference.o
16
        /usr/p3/bin/i960-vxworks-g++ `getsrc bug.reference.C` -I. -Iinc1 -Iinc2
17
 -I/vw5.0.3/h  -I/vw5.0.3/h/i960 -I/usr/p3/lib/gcc-lib/i960-vxworks/cygnus-2.3.3
18
/include -I/usr/p3/lib/gcc-lib/i960-vxworks/cygnus-2.3.3-930417/include -I/usr/p
19
3/lib/i960-vxworks/include -I/usr/p3/i960-vxworks/include  -c -DCPU_FAMILY=I960
20
-DCPU=I960CA -mca -mold-align -g3 -O1 -DASSERT_ON -nostdinc -nostdinc++ -MD
21
./bug.reference.C: In method `class1::class1 (long unsigned int, long unsigned i
22
nt **&)':
23
./bug.reference.C:43: cannot convert type `long unsigned int **'
24
./bug.reference.C:43:        to type `long unsigned int *[]&'
25
make: 1254-004 The error code from the last command is 1.
26
*/
27
 
28
// typedefs
29
typedef unsigned long u32;
30
typedef u32 *ul[16];
31
 
32
// class defs
33
class class1 {
34
    u32   var1;
35
    class1(const class1 &);                   // Copy constructor
36
    class1& operator=(const class1 &);        // operator= member function
37
public:
38
    class1(u32, ul&);
39
    ul  &ulref;
40
    ~class1() {}
41
};
42
 
43
 
44
// member function defs
45
class1::class1(u32 u, ul &l) : var1(u), ulref(l)
46
{}
47
 
48
/* ===========================================================================
49
Note:  The following is a "work around" that allows the successful compilation.
50
 
51
 
52
// typedefs
53
typedef unsigned long u32;
54
typedef u32 *ul[16];
55
 
56
// class defs
57
class class1 {
58
    u32   var1;
59
    class1(const class1 &);                   // Copy constructor
60
    class1& operator=(const class1 &);        // operator= member function
61
public:
62
    class1(u32, ul*);
63
    ul  &ulref;
64
    ~class1() {}
65
};
66
 
67
 
68
// member function defs
69
class1::class1(u32 u, ul *l) : var1(u), ulref(*l)
70
{}
71
============================================================================*/

powered by: WebSVN 2.1.0

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