ignore invalid DOF provider sections
[binutils-gdb.git] / gdb / testsuite / gdb.cp / koenig.cc
blob01e2637cfbd7d92896697eb5cecc1fd3ac56034e
1 namespace A
3 class C
5 public:
6 static const int x = 11;
7 };
9 int
10 first (C c)
12 return 11;
15 int
16 first (int a, C c)
18 return 22;
21 int
22 second (int a, int b, C cc, int c, int d)
24 return 33;
27 int
28 entry (C c)
30 return 44;
34 struct B
36 A::C c;
39 //------------
41 namespace E
43 class O{};
44 int foo (O o){return 1; }
45 int foo (O o, O o2){return 2; }
46 int foo (O o, O o2, int i){return 3; }
49 namespace F
51 class O{};
52 int foo ( O fo, ::E::O eo){ return 4;}
53 int foo (int i, O fo, ::E::O eo){ return 5;}
56 namespace G
58 class O{};
59 int foo (O go, ::F::O fo, ::E::O eo){ return 6; }
62 //------------
64 namespace H
66 class O{};
67 int foo (O){ return 7;}
70 namespace I
72 class O: public H::O {};
73 class X: H::O{};
76 //------------
78 namespace J
80 union U{};
81 struct S{};
82 enum E{};
84 class A{
85 public:
86 class B{};
89 class C{};
91 int foo (U){ return 8;}
92 int foo (S){ return 9;}
93 int foo (E){ return 10;}
94 int foo (A::B){ return 11;}
95 int foo (A*){ return 12;}
96 int foo (A**){ return 13;}
97 int foo (C[]){ return 14;}
100 //------------
102 namespace K{
103 class O{};
105 int foo(O, int){
106 return 15;
109 int bar(O, int){
110 return 15;
114 int foo(K::O, float){
115 return 16;
118 int bar(K::O, int){
119 return 16;
121 //------------
123 namespace L {
124 namespace A{
125 namespace B{
126 class O {};
128 int foo (O){
129 return 17;
136 //------------
138 namespace M {
139 class A{
140 public:
141 int foo(char) {
142 return 18;
146 int foo(A,char){
147 return 19;
150 int foo(A *,char){
151 return 23;
154 int bar(char){
155 return 21;
158 namespace N {
159 int foo(::M::A,int){
160 return 20;
163 int bar(int){
164 return 22;
168 //------------
170 namespace O {
171 class A{};
173 int foo(A,int){
174 return 23;
179 typedef O::A TOA;
180 typedef TOA TTOA;
182 //------------
184 static union {
185 int a;
186 char b;
187 }p_union;
189 //------------
191 namespace P {
192 class Q{
193 public:
194 int operator== (int)
196 return 24;
199 int operator== (float)
201 return 25;
204 int operator+ (float)
206 return 26;
211 int operator!= (Q, int)
213 return 27;
216 int operator!= (Q, double)
218 return 28;
221 int operator+ (Q, int)
223 return 29;
226 int operator++ (Q)
228 return 30;
232 //------------
234 class R {
235 public:
236 int rfoo(){ return 31; }
237 int rbar(){
238 return 1; // marker1
242 //------------
245 main ()
247 A::C c;
248 B b;
250 A::first (c);
251 first (0, c);
252 second (0, 0, c, 0, 0);
253 entry (c);
254 A::first (b.c);
256 E::O eo;
257 F::O fo;
258 G::O go;
260 foo (eo);
261 foo (eo, eo);
262 foo (eo, eo, 1);
263 foo (fo, eo);
264 foo (1 ,fo, eo);
265 foo (go, fo, eo);
267 I::O io;
268 I::X ix;
270 foo (io);
271 //foo (ix);
273 J::U ju;
274 J::S js;
275 J::E je;
276 J::A::B jab;
277 J::A *jap;
278 J::A **japp;
279 J::C jca[3];
281 foo (ju);
282 foo (js);
283 foo (je);
284 foo (jab);
285 foo (jap);
286 foo (japp);
287 foo (jca);
289 K::O ko;
290 foo (ko, 1);
291 foo (ko, 1.0f);
292 //bar(ko,1);
294 L::A::B::O labo;
295 foo (labo);
297 M::A ma;
298 foo(ma,'a');
299 ma.foo('a');
300 M::N::foo(ma,'a');
302 M::bar('a');
303 M::N::bar('a');
305 TTOA ttoa;
306 foo (ttoa, 'a');
308 P::Q q;
309 q == 5;
310 q == 5.0f;
311 q != 5;
312 q != 5.0f;
313 q + 5;
314 q + 5.0f;
316 ++q;
318 R r;
319 r.rbar();
320 r.rfoo();
322 return first (0, c) + foo (eo) +
323 foo (eo, eo) + foo (eo, eo, 1) +
324 foo (fo, eo) + foo (1 ,fo, eo) +
325 foo (go, fo, eo);