1 | /* $Id: longnames.cpp 825 2003-10-08 19:31:15Z bird $ */
|
---|
2 | /** @file
|
---|
3 | *
|
---|
4 | * This testcase expose the mangling problem we face with the IBM debuggers;
|
---|
5 | * more specificly the 106 char limit. The testcase must cause both VAC and
|
---|
6 | * GCC to genereate C++ mangled names to exceed this limit.
|
---|
7 | *
|
---|
8 | * InnoTek Systemberatung GmbH confidential
|
---|
9 | *
|
---|
10 | * Copyright (c) 2003 InnoTek Systemberatung GmbH
|
---|
11 | * Author: knut st. osmundsen <bird-srcspam@anduin.net>
|
---|
12 | *
|
---|
13 | * All Rights Reserved
|
---|
14 | */
|
---|
15 |
|
---|
16 | #define NULL 0
|
---|
17 |
|
---|
18 | struct StructureWithALongNameA;
|
---|
19 | struct StructureWithALongNameB;
|
---|
20 | struct StructureWithALongNameC;
|
---|
21 | struct StructureWithALongNameD;
|
---|
22 | struct StructureWithALongNameE;
|
---|
23 | struct StructureWithALongNameF;
|
---|
24 | struct StructureWithALongNameG;
|
---|
25 | struct StructureWithALongNameH;
|
---|
26 | struct StructureWithALongNameI;
|
---|
27 | struct StructureWithALongNameJ;
|
---|
28 | struct StructureWithALongNameK;
|
---|
29 | struct StructureWithALongNameL;
|
---|
30 | struct StructureWithALongNameM;
|
---|
31 | struct StructureWithALongNameN;
|
---|
32 | struct StructureWithALongNameO;
|
---|
33 |
|
---|
34 | class bar
|
---|
35 | {
|
---|
36 | public:
|
---|
37 | bar()
|
---|
38 | { }
|
---|
39 |
|
---|
40 | struct StructureWithALongNameA *foomethod(
|
---|
41 | StructureWithALongNameA *a = NULL,
|
---|
42 | StructureWithALongNameB *b = NULL,
|
---|
43 | StructureWithALongNameC *c = NULL,
|
---|
44 | StructureWithALongNameD *d = NULL,
|
---|
45 | StructureWithALongNameE *e = NULL,
|
---|
46 | StructureWithALongNameF *f = NULL,
|
---|
47 | StructureWithALongNameG *g = NULL,
|
---|
48 | StructureWithALongNameH *h = NULL,
|
---|
49 | StructureWithALongNameI *i = NULL,
|
---|
50 | StructureWithALongNameJ *j = NULL,
|
---|
51 | StructureWithALongNameK *k = NULL,
|
---|
52 | StructureWithALongNameK *l = NULL,
|
---|
53 | StructureWithALongNameK *m = NULL,
|
---|
54 | StructureWithALongNameK *n = NULL,
|
---|
55 | StructureWithALongNameK *o = NULL)
|
---|
56 | {
|
---|
57 | return NULL;
|
---|
58 | }
|
---|
59 |
|
---|
60 | static struct StructureWithALongNameA *foostatic(
|
---|
61 | StructureWithALongNameA *a = NULL,
|
---|
62 | StructureWithALongNameB *b = NULL,
|
---|
63 | StructureWithALongNameC *c = NULL,
|
---|
64 | StructureWithALongNameD *d = NULL,
|
---|
65 | StructureWithALongNameE *e = NULL,
|
---|
66 | StructureWithALongNameF *f = NULL,
|
---|
67 | StructureWithALongNameG *g = NULL,
|
---|
68 | StructureWithALongNameH *h = NULL,
|
---|
69 | StructureWithALongNameI *i = NULL,
|
---|
70 | StructureWithALongNameJ *j = NULL,
|
---|
71 | StructureWithALongNameK *k = NULL,
|
---|
72 | StructureWithALongNameK *l = NULL,
|
---|
73 | StructureWithALongNameK *m = NULL,
|
---|
74 | StructureWithALongNameK *n = NULL,
|
---|
75 | StructureWithALongNameK *o = NULL)
|
---|
76 | {
|
---|
77 | return NULL;
|
---|
78 | }
|
---|
79 | };
|
---|
80 |
|
---|
81 | class looooooooooooooooooooooooooooooonnnnnnnnnnnnnnnnnnnnnnnnnggggggggggggggggggggggggggccccccccccccccccccccccccccccccccccccllllllllllllllllllllllllaaaaaaaaaaaaaaassssssssssssss
|
---|
82 | {
|
---|
83 | public:
|
---|
84 | looooooooooooooooooooooooooooooonnnnnnnnnnnnnnnnnnnnnnnnnggggggggggggggggggggggggggccccccccccccccccccccccccccccccccccccllllllllllllllllllllllllaaaaaaaaaaaaaaassssssssssssss()
|
---|
85 | {
|
---|
86 | }
|
---|
87 | static long ppppppppppppppppppprrrrrrrrrrrrreeeeeeeeeettttttttttttyyyyyyyyyylllllllloooooooooonnnnnnnnnnnngggggggssssssssstttttttttttaaaaaaaaaaaaatttttttiiiiiiiiiicccccccccc;
|
---|
88 | int getstatic()
|
---|
89 | {
|
---|
90 | return ppppppppppppppppppprrrrrrrrrrrrreeeeeeeeeettttttttttttyyyyyyyyyylllllllloooooooooonnnnnnnnnnnngggggggssssssssstttttttttttaaaaaaaaaaaaatttttttiiiiiiiiiicccccccccc;
|
---|
91 | }
|
---|
92 | };
|
---|
93 |
|
---|
94 | long looooooooooooooooooooooooooooooonnnnnnnnnnnnnnnnnnnnnnnnnggggggggggggggggggggggggggccccccccccccccccccccccccccccccccccccllllllllllllllllllllllllaaaaaaaaaaaaaaassssssssssssss::ppppppppppppppppppprrrrrrrrrrrrreeeeeeeeeettttttttttttyyyyyyyyyylllllllloooooooooonnnnnnnnnnnngggggggssssssssstttttttttttaaaaaaaaaaaaatttttttiiiiiiiiiicccccccccc
|
---|
95 | = -1;
|
---|
96 |
|
---|
97 | struct StructureWithALongNameA *foo(
|
---|
98 | StructureWithALongNameA *a = NULL,
|
---|
99 | StructureWithALongNameB *b = NULL,
|
---|
100 | StructureWithALongNameC *c = NULL,
|
---|
101 | StructureWithALongNameD *d = NULL,
|
---|
102 | StructureWithALongNameE *e = NULL,
|
---|
103 | StructureWithALongNameF *f = NULL,
|
---|
104 | StructureWithALongNameG *g = NULL,
|
---|
105 | StructureWithALongNameH *h = NULL,
|
---|
106 | StructureWithALongNameI *i = NULL,
|
---|
107 | StructureWithALongNameJ *j = NULL,
|
---|
108 | StructureWithALongNameK *k = NULL,
|
---|
109 | StructureWithALongNameK *l = NULL,
|
---|
110 | StructureWithALongNameK *m = NULL,
|
---|
111 | StructureWithALongNameK *n = NULL,
|
---|
112 | StructureWithALongNameK *o = NULL)
|
---|
113 | {
|
---|
114 | return NULL;
|
---|
115 | }
|
---|
116 |
|
---|
117 |
|
---|
118 | int main()
|
---|
119 | {
|
---|
120 | bar obj;
|
---|
121 | looooooooooooooooooooooooooooooonnnnnnnnnnnnnnnnnnnnnnnnnggggggggggggggggggggggggggccccccccccccccccccccccccccccccccccccllllllllllllllllllllllllaaaaaaaaaaaaaaassssssssssssss obj2;
|
---|
122 | bar::foostatic();
|
---|
123 | obj.foomethod();
|
---|
124 | obj2.getstatic();
|
---|
125 | foo();
|
---|
126 | return 0;
|
---|
127 | }
|
---|