source: branches/libc-0.6/testcase/456/longnames.cpp@ 2528

Last change on this file since 2528 was 825, checked in by bird, 22 years ago

More debug testcases.

  • Property cvs2svn:cvs-rev set to 1.1
  • Property svn:eol-style set to native
  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 4.4 KB
Line 
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
18struct StructureWithALongNameA;
19struct StructureWithALongNameB;
20struct StructureWithALongNameC;
21struct StructureWithALongNameD;
22struct StructureWithALongNameE;
23struct StructureWithALongNameF;
24struct StructureWithALongNameG;
25struct StructureWithALongNameH;
26struct StructureWithALongNameI;
27struct StructureWithALongNameJ;
28struct StructureWithALongNameK;
29struct StructureWithALongNameL;
30struct StructureWithALongNameM;
31struct StructureWithALongNameN;
32struct StructureWithALongNameO;
33
34class bar
35{
36public:
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
81class looooooooooooooooooooooooooooooonnnnnnnnnnnnnnnnnnnnnnnnnggggggggggggggggggggggggggccccccccccccccccccccccccccccccccccccllllllllllllllllllllllllaaaaaaaaaaaaaaassssssssssssss
82{
83public:
84 looooooooooooooooooooooooooooooonnnnnnnnnnnnnnnnnnnnnnnnnggggggggggggggggggggggggggccccccccccccccccccccccccccccccccccccllllllllllllllllllllllllaaaaaaaaaaaaaaassssssssssssss()
85 {
86 }
87static long ppppppppppppppppppprrrrrrrrrrrrreeeeeeeeeettttttttttttyyyyyyyyyylllllllloooooooooonnnnnnnnnnnngggggggssssssssstttttttttttaaaaaaaaaaaaatttttttiiiiiiiiiicccccccccc;
88 int getstatic()
89 {
90 return ppppppppppppppppppprrrrrrrrrrrrreeeeeeeeeettttttttttttyyyyyyyyyylllllllloooooooooonnnnnnnnnnnngggggggssssssssstttttttttttaaaaaaaaaaaaatttttttiiiiiiiiiicccccccccc;
91 }
92};
93
94long looooooooooooooooooooooooooooooonnnnnnnnnnnnnnnnnnnnnnnnnggggggggggggggggggggggggggccccccccccccccccccccccccccccccccccccllllllllllllllllllllllllaaaaaaaaaaaaaaassssssssssssss::ppppppppppppppppppprrrrrrrrrrrrreeeeeeeeeettttttttttttyyyyyyyyyylllllllloooooooooonnnnnnnnnnnngggggggssssssssstttttttttttaaaaaaaaaaaaatttttttiiiiiiiiiicccccccccc
95 = -1;
96
97struct 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
118int main()
119{
120 bar obj;
121 looooooooooooooooooooooooooooooonnnnnnnnnnnnnnnnnnnnnnnnnggggggggggggggggggggggggggccccccccccccccccccccccccccccccccccccllllllllllllllllllllllllaaaaaaaaaaaaaaassssssssssssss obj2;
122 bar::foostatic();
123 obj.foomethod();
124 obj2.getstatic();
125 foo();
126 return 0;
127}
Note: See TracBrowser for help on using the repository browser.