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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.target/] [spu/] [ea/] [test-sizes.c] - Blame information for rev 414

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 327 jeremybenn
/* Copyright (C) 2009 Free Software Foundation, Inc.
2
 
3
   This file is free software; you can redistribute it and/or modify it under
4
   the terms of the GNU General Public License as published by the Free
5
   Software Foundation; either version 3 of the License, or (at your option)
6
   any later version.
7
 
8
   This file is distributed in the hope that it will be useful, but WITHOUT
9
   ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10
   FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
11
   for more details.
12
 
13
   You should have received a copy of the GNU General Public License
14
   along with this file; see the file COPYING3.  If not see
15
   <http://www.gnu.org/licenses/>.  */
16
 
17
/* { dg-do run } */
18
 
19
#ifdef __EA32__
20
#define EA_PTRSIZE 4
21
#endif
22
#ifdef __EA64__
23
#define EA_PTRSIZE 8
24
#endif
25
 
26
#if !defined(LEVEL1) && !defined(LEVEL2) && !defined(LEVEL3)
27
#define LEVEL1 1                /* single pointer indirection */
28
#define LEVEL2 1                /* 2 levels of pointer indirection */
29
#define LEVEL3 1                /* 3 levels of pointer indirection */
30
 
31
#else
32
#ifndef LEVEL1
33
#define LEVEL1 0
34
#endif
35
 
36
#ifndef LEVEL2
37
#define LEVEL2 0
38
#endif
39
 
40
#ifndef LEVEL3
41
#define LEVEL3 0
42
#endif
43
#endif
44
 
45
#if !defined(USE_SIMPLE) && !defined(USE_COMPLEX)
46
#define USE_SIMPLE  1           /* build up pointers via multiple typedefs */
47
#define USE_COMPLEX 1           /* single typedef for pointer indirections */
48
 
49
#else
50
#ifndef USE_SIMPLE
51
#define USE_SIMPLE 0
52
#endif
53
 
54
#ifndef USE_COMPLEX
55
#define USE_COMPLEX 0
56
#endif
57
#endif
58
 
59
#if !defined(USE_LOCAL_VAR) && !defined(USE_EA_VAR)
60
#define USE_LOCAL_VAR 1         /* use variables declared locally */
61
#define USE_EA_VAR    1         /* use variables on the host */
62
 
63
#else
64
#ifndef USE_LOCAL_VAR
65
#define USE_LOCAL_VAR 0
66
#endif
67
 
68
#ifndef USE_EA_VAR
69
#define USE_EA_VAR    0
70
#endif
71
#endif
72
 
73
static int errors;
74
 
75
#ifdef USE_PRINTF               /* print results via printf */
76
#include <stdio.h>
77
#include <stdlib.h>
78
 
79
static int num_tests;
80
 
81
#define TEST_SIZE(EXPR, EXPECTED)                                       \
82
do {                                                                    \
83
  char *msg;                                                            \
84
                                                                        \
85
  if (sizeof (EXPR) != EXPECTED)                                        \
86
    {                                                                   \
87
      msg = ", FAIL";                                                   \
88
      errors++;                                                         \
89
    }                                                                   \
90
  else                                                                  \
91
    msg = "";                                                           \
92
                                                                        \
93
  num_tests++;                                                          \
94
  printf ("sizeof %-20s = %2u, expected = %2u%s\n",                     \
95
          #EXPR,                                                        \
96
          (unsigned) sizeof (EXPR),                                     \
97
          (unsigned) EXPECTED,                                          \
98
          msg);                                                         \
99
} while (0)
100
 
101
#define PRINT1(FMT)       printf (FMT)
102
#define PRINT2(FMT,A1)    printf (FMT,A1)
103
#define PRINT3(FMT,A1,A2) printf (FMT,A1,A2)
104
 
105
#else   /* standalone */
106
extern void abort (void);
107
 
108
#define TEST_SIZE(EXPR, EXPECTED)                                       \
109
do {                                                                    \
110
  if (sizeof (EXPR) != EXPECTED)                                        \
111
    abort ();                                                           \
112
} while (0)
113
 
114
#define PRINT1(FMT)
115
#define PRINT2(FMT,ARG)
116
#define PRINT3(FMT,A1,A2)
117
#endif
118
 
119
/* 'local memory' hack to keep the same spacing.  */
120
#define __lm
121
 
122
#if USE_SIMPLE
123
#if (LEVEL1 || LEVEL2 || LEVEL3)
124
typedef __lm char *lm_ptr_t;
125
typedef __ea char *ea_ptr_t;
126
#endif
127
 
128
#if LEVEL1
129
#if USE_LOCAL_VAR
130
__lm lm_ptr_t lm_ptr;
131
__lm ea_ptr_t ea_ptr;
132
#endif
133
 
134
#if USE_EA_VAR
135
__ea lm_ptr_t lm_ptr_ea;
136
__ea ea_ptr_t ea_ptr_ea;
137
#endif
138
#endif
139
 
140
#if (LEVEL2 || LEVEL3)
141
typedef __lm lm_ptr_t *lm_lm_ptr_t;
142
typedef __ea lm_ptr_t *ea_lm_ptr_t;
143
typedef __lm ea_ptr_t *lm_ea_ptr_t;
144
typedef __ea ea_ptr_t *ea_ea_ptr_t;
145
#endif
146
 
147
#if LEVEL2
148
#if USE_LOCAL_VAR
149
__lm lm_lm_ptr_t lm_lm_ptr;
150
__lm ea_lm_ptr_t ea_lm_ptr;
151
__lm lm_ea_ptr_t lm_ea_ptr;
152
__lm ea_ea_ptr_t ea_ea_ptr;
153
#endif
154
 
155
#if USE_EA_VAR
156
__ea lm_lm_ptr_t lm_lm_ptr_ea;
157
__ea ea_lm_ptr_t ea_lm_ptr_ea;
158
__ea lm_ea_ptr_t lm_ea_ptr_ea;
159
__ea ea_ea_ptr_t ea_ea_ptr_ea;
160
#endif
161
#endif
162
 
163
#if LEVEL3
164
typedef __lm lm_lm_ptr_t *lm_lm_lm_ptr_t;
165
typedef __ea lm_lm_ptr_t *ea_lm_lm_ptr_t;
166
typedef __lm ea_lm_ptr_t *lm_ea_lm_ptr_t;
167
typedef __ea ea_lm_ptr_t *ea_ea_lm_ptr_t;
168
typedef __lm lm_ea_ptr_t *lm_lm_ea_ptr_t;
169
typedef __ea lm_ea_ptr_t *ea_lm_ea_ptr_t;
170
typedef __lm ea_ea_ptr_t *lm_ea_ea_ptr_t;
171
typedef __ea ea_ea_ptr_t *ea_ea_ea_ptr_t;
172
 
173
#if USE_LOCAL_VAR
174
__lm lm_lm_lm_ptr_t lm_lm_lm_ptr;
175
__lm ea_lm_lm_ptr_t ea_lm_lm_ptr;
176
__lm lm_ea_lm_ptr_t lm_ea_lm_ptr;
177
__lm ea_ea_lm_ptr_t ea_ea_lm_ptr;
178
__lm lm_lm_ea_ptr_t lm_lm_ea_ptr;
179
__lm ea_lm_ea_ptr_t ea_lm_ea_ptr;
180
__lm lm_ea_ea_ptr_t lm_ea_ea_ptr;
181
__lm ea_ea_ea_ptr_t ea_ea_ea_ptr;
182
#endif
183
 
184
#if USE_EA_VAR
185
__ea lm_lm_lm_ptr_t lm_lm_lm_ptr_ea;
186
__ea ea_lm_lm_ptr_t ea_lm_lm_ptr_ea;
187
__ea lm_ea_lm_ptr_t lm_ea_lm_ptr_ea;
188
__ea ea_ea_lm_ptr_t ea_ea_lm_ptr_ea;
189
__ea lm_lm_ea_ptr_t lm_lm_ea_ptr_ea;
190
__ea ea_lm_ea_ptr_t ea_lm_ea_ptr_ea;
191
__ea lm_ea_ea_ptr_t lm_ea_ea_ptr_ea;
192
__ea ea_ea_ea_ptr_t ea_ea_ea_ptr_ea;
193
#endif
194
#endif
195
#endif
196
 
197
#if USE_COMPLEX
198
#if LEVEL1
199
#if USE_LOCAL_VAR
200
__lm char *__lm lm_cptr;
201
__ea char *__lm ea_cptr;
202
#endif
203
 
204
#if USE_EA_VAR
205
__lm char *__ea lm_cptr_ea;
206
__ea char *__ea ea_cptr_ea;
207
#endif
208
#endif
209
 
210
#if LEVEL2
211
#if USE_LOCAL_VAR
212
__lm char *__lm *__lm lm_lm_cptr;
213
__lm char *__ea *__lm ea_lm_cptr;
214
__ea char *__lm *__lm lm_ea_cptr;
215
__ea char *__ea *__lm ea_ea_cptr;
216
#endif
217
 
218
#if USE_EA_VAR
219
__lm char *__lm *__ea lm_lm_cptr_ea;
220
__lm char *__ea *__ea ea_lm_cptr_ea;
221
__ea char *__lm *__ea lm_ea_cptr_ea;
222
__ea char *__ea *__ea ea_ea_cptr_ea;
223
#endif
224
#endif
225
 
226
#if LEVEL3
227
#if USE_LOCAL_VAR
228
__lm char *__lm *__lm *__lm lm_lm_lm_cptr;
229
__lm char *__ea *__lm *__lm lm_ea_lm_cptr;
230
__ea char *__lm *__lm *__lm lm_lm_ea_cptr;
231
__ea char *__ea *__lm *__lm lm_ea_ea_cptr;
232
__lm char *__lm *__ea *__lm ea_lm_lm_cptr;
233
__lm char *__ea *__ea *__lm ea_ea_lm_cptr;
234
__ea char *__lm *__ea *__lm ea_lm_ea_cptr;
235
__ea char *__ea *__ea *__lm ea_ea_ea_cptr;
236
#endif
237
 
238
#if USE_EA_VAR
239
__lm char *__lm *__lm *__ea lm_lm_lm_cptr_ea;
240
__lm char *__ea *__lm *__ea lm_ea_lm_cptr_ea;
241
__ea char *__lm *__lm *__ea lm_lm_ea_cptr_ea;
242
__ea char *__ea *__lm *__ea lm_ea_ea_cptr_ea;
243
__lm char *__lm *__ea *__ea ea_lm_lm_cptr_ea;
244
__lm char *__ea *__ea *__ea ea_ea_lm_cptr_ea;
245
__ea char *__lm *__ea *__ea ea_lm_ea_cptr_ea;
246
__ea char *__ea *__ea *__ea ea_ea_ea_cptr_ea;
247
#endif
248
#endif
249
#endif
250
 
251
int
252
main ()
253
{
254
  PRINT2 ("LEVEL1        = %d\n", LEVEL1);
255
  PRINT2 ("LEVEL2        = %d\n", LEVEL2);
256
  PRINT2 ("LEVEL3        = %d\n", LEVEL3);
257
  PRINT2 ("USE_SIMPLE    = %d\n", USE_SIMPLE);
258
  PRINT2 ("USE_COMPLEX   = %d\n", USE_COMPLEX);
259
  PRINT2 ("USE_LOCAL_VAR = %d\n", USE_LOCAL_VAR);
260
  PRINT2 ("USE_EA_VAR    = %d\n", USE_EA_VAR);
261
  PRINT1 ("\n");
262
 
263
#if USE_SIMPLE
264
#if LEVEL1
265
#if USE_LOCAL_VAR
266
  TEST_SIZE ( lm_ptr, 4);
267
  TEST_SIZE (*lm_ptr, 1);
268
  TEST_SIZE ( ea_ptr, EA_PTRSIZE);
269
  TEST_SIZE (*ea_ptr, 1);
270
  PRINT1 ("\n");
271
#endif
272
 
273
#if USE_EA_VAR
274
  TEST_SIZE ( lm_ptr_ea, 4);
275
  TEST_SIZE (*lm_ptr_ea, 1);
276
  TEST_SIZE ( ea_ptr_ea, EA_PTRSIZE);
277
  TEST_SIZE (*ea_ptr_ea, 1);
278
  PRINT1 ("\n");
279
#endif
280
#endif
281
 
282
#if LEVEL2
283
#if USE_LOCAL_VAR
284
  TEST_SIZE (  lm_lm_ptr, 4);
285
  TEST_SIZE ( *lm_lm_ptr, 4);
286
  TEST_SIZE (**lm_lm_ptr, 1);
287
  PRINT1 ("\n");
288
 
289
  TEST_SIZE (  lm_ea_ptr, 4);
290
  TEST_SIZE ( *lm_ea_ptr, EA_PTRSIZE);
291
  TEST_SIZE (**lm_ea_ptr, 1);
292
  PRINT1 ("\n");
293
 
294
  TEST_SIZE (  ea_lm_ptr, EA_PTRSIZE);
295
  TEST_SIZE ( *ea_lm_ptr, 4);
296
  TEST_SIZE (**ea_lm_ptr, 1);
297
  PRINT1 ("\n");
298
 
299
  TEST_SIZE (  ea_ea_ptr, EA_PTRSIZE);
300
  TEST_SIZE ( *ea_ea_ptr, EA_PTRSIZE);
301
  TEST_SIZE (**ea_ea_ptr, 1);
302
  PRINT1 ("\n");
303
#endif
304
 
305
#if USE_EA_VAR
306
  TEST_SIZE (  lm_lm_ptr_ea, 4);
307
  TEST_SIZE ( *lm_lm_ptr_ea, 4);
308
  TEST_SIZE (**lm_lm_ptr_ea, 1);
309
  PRINT1 ("\n");
310
 
311
  TEST_SIZE (  lm_ea_ptr_ea, 4);
312
  TEST_SIZE ( *lm_ea_ptr_ea, EA_PTRSIZE);
313
  TEST_SIZE (**lm_ea_ptr_ea, 1);
314
  PRINT1 ("\n");
315
 
316
  TEST_SIZE (  ea_lm_ptr_ea, EA_PTRSIZE);
317
  TEST_SIZE ( *ea_lm_ptr_ea, 4);
318
  TEST_SIZE (**ea_lm_ptr_ea, 1);
319
  PRINT1 ("\n");
320
 
321
  TEST_SIZE (  ea_ea_ptr_ea, EA_PTRSIZE);
322
  TEST_SIZE ( *ea_ea_ptr_ea, EA_PTRSIZE);
323
  TEST_SIZE (**ea_ea_ptr_ea, 1);
324
  PRINT1 ("\n");
325
#endif
326
#endif
327
 
328
#if LEVEL3
329
#if USE_LOCAL_VAR
330
  TEST_SIZE (   lm_lm_lm_ptr, 4);
331
  TEST_SIZE (  *lm_lm_lm_ptr, 4);
332
  TEST_SIZE ( **lm_lm_lm_ptr, 4);
333
  TEST_SIZE (***lm_lm_lm_ptr, 1);
334
  PRINT1 ("\n");
335
 
336
  TEST_SIZE (   lm_lm_ea_ptr, 4);
337
  TEST_SIZE (  *lm_lm_ea_ptr, 4);
338
  TEST_SIZE ( **lm_lm_ea_ptr, EA_PTRSIZE);
339
  TEST_SIZE (***lm_lm_ea_ptr, 1);
340
  PRINT1 ("\n");
341
 
342
  TEST_SIZE (   lm_ea_lm_ptr, 4);
343
  TEST_SIZE (  *lm_ea_lm_ptr, EA_PTRSIZE);
344
  TEST_SIZE ( **lm_ea_lm_ptr, 4);
345
  TEST_SIZE (***lm_ea_lm_ptr, 1);
346
  PRINT1 ("\n");
347
 
348
  TEST_SIZE (   lm_ea_ea_ptr, 4);
349
  TEST_SIZE (  *lm_ea_ea_ptr, EA_PTRSIZE);
350
  TEST_SIZE ( **lm_ea_ea_ptr, EA_PTRSIZE);
351
  TEST_SIZE (***lm_ea_ea_ptr, 1);
352
  PRINT1 ("\n");
353
 
354
  TEST_SIZE (   ea_lm_lm_ptr, EA_PTRSIZE);
355
  TEST_SIZE (  *ea_lm_lm_ptr, 4);
356
  TEST_SIZE ( **ea_lm_lm_ptr, 4);
357
  TEST_SIZE (***ea_lm_lm_ptr, 1);
358
  PRINT1 ("\n");
359
 
360
  TEST_SIZE (   ea_lm_ea_ptr, EA_PTRSIZE);
361
  TEST_SIZE (  *ea_lm_ea_ptr, 4);
362
  TEST_SIZE ( **ea_lm_ea_ptr, EA_PTRSIZE);
363
  TEST_SIZE (***ea_lm_ea_ptr, 1);
364
  PRINT1 ("\n");
365
 
366
  TEST_SIZE (   ea_ea_lm_ptr, EA_PTRSIZE);
367
  TEST_SIZE (  *ea_ea_lm_ptr, EA_PTRSIZE);
368
  TEST_SIZE ( **ea_ea_lm_ptr, 4);
369
  TEST_SIZE (***ea_ea_lm_ptr, 1);
370
  PRINT1 ("\n");
371
 
372
  TEST_SIZE (   ea_ea_ea_ptr, EA_PTRSIZE);
373
  TEST_SIZE (  *ea_ea_ea_ptr, EA_PTRSIZE);
374
  TEST_SIZE ( **ea_ea_ea_ptr, EA_PTRSIZE);
375
  TEST_SIZE (***ea_ea_ea_ptr, 1);
376
  PRINT1 ("\n");
377
#endif
378
 
379
#if USE_EA_VAR
380
  TEST_SIZE (   lm_lm_lm_ptr_ea, 4);
381
  TEST_SIZE (  *lm_lm_lm_ptr_ea, 4);
382
  TEST_SIZE ( **lm_lm_lm_ptr_ea, 4);
383
  TEST_SIZE (***lm_lm_lm_ptr_ea, 1);
384
  PRINT1 ("\n");
385
 
386
  TEST_SIZE (   lm_lm_ea_ptr_ea, 4);
387
  TEST_SIZE (  *lm_lm_ea_ptr_ea, 4);
388
  TEST_SIZE ( **lm_lm_ea_ptr_ea, EA_PTRSIZE);
389
  TEST_SIZE (***lm_lm_ea_ptr_ea, 1);
390
  PRINT1 ("\n");
391
 
392
  TEST_SIZE (   lm_ea_lm_ptr_ea, 4);
393
  TEST_SIZE (  *lm_ea_lm_ptr_ea, EA_PTRSIZE);
394
  TEST_SIZE ( **lm_ea_lm_ptr_ea, 4);
395
  TEST_SIZE (***lm_ea_lm_ptr_ea, 1);
396
  PRINT1 ("\n");
397
 
398
  TEST_SIZE (   lm_ea_ea_ptr_ea, 4);
399
  TEST_SIZE (  *lm_ea_ea_ptr_ea, EA_PTRSIZE);
400
  TEST_SIZE ( **lm_ea_ea_ptr_ea, EA_PTRSIZE);
401
  TEST_SIZE (***lm_ea_ea_ptr_ea, 1);
402
  PRINT1 ("\n");
403
 
404
  TEST_SIZE (   ea_lm_lm_ptr_ea, EA_PTRSIZE);
405
  TEST_SIZE (  *ea_lm_lm_ptr_ea, 4);
406
  TEST_SIZE ( **ea_lm_lm_ptr_ea, 4);
407
  TEST_SIZE (***ea_lm_lm_ptr_ea, 1);
408
  PRINT1 ("\n");
409
 
410
  TEST_SIZE (   ea_lm_ea_ptr_ea, EA_PTRSIZE);
411
  TEST_SIZE (  *ea_lm_ea_ptr_ea, 4);
412
  TEST_SIZE ( **ea_lm_ea_ptr_ea, EA_PTRSIZE);
413
  TEST_SIZE (***ea_lm_ea_ptr_ea, 1);
414
  PRINT1 ("\n");
415
 
416
  TEST_SIZE (   ea_ea_lm_ptr_ea, EA_PTRSIZE);
417
  TEST_SIZE (  *ea_ea_lm_ptr_ea, EA_PTRSIZE);
418
  TEST_SIZE ( **ea_ea_lm_ptr_ea, 4);
419
  TEST_SIZE (***ea_ea_lm_ptr_ea, 1);
420
  PRINT1 ("\n");
421
 
422
  TEST_SIZE (   ea_ea_ea_ptr_ea, EA_PTRSIZE);
423
  TEST_SIZE (  *ea_ea_ea_ptr_ea, EA_PTRSIZE);
424
  TEST_SIZE ( **ea_ea_ea_ptr_ea, EA_PTRSIZE);
425
  TEST_SIZE (***ea_ea_ea_ptr_ea, 1);
426
  PRINT1 ("\n");
427
#endif
428
#endif
429
#endif
430
 
431
#if USE_COMPLEX
432
#if LEVEL1
433
#if USE_LOCAL_VAR
434
  TEST_SIZE ( lm_cptr, 4);
435
  TEST_SIZE (*lm_cptr, 1);
436
  TEST_SIZE ( ea_cptr, EA_PTRSIZE);
437
  TEST_SIZE (*ea_cptr, 1);
438
  PRINT1 ("\n");
439
#endif
440
 
441
#if USE_EA_VAR
442
  TEST_SIZE ( lm_cptr_ea, 4);
443
  TEST_SIZE (*lm_cptr_ea, 1);
444
  TEST_SIZE ( ea_cptr_ea, EA_PTRSIZE);
445
  TEST_SIZE (*ea_cptr_ea, 1);
446
  PRINT1 ("\n");
447
#endif
448
#endif
449
 
450
#if LEVEL2
451
#if USE_LOCAL_VAR
452
  TEST_SIZE (  lm_lm_cptr, 4);
453
  TEST_SIZE ( *lm_lm_cptr, 4);
454
  TEST_SIZE (**lm_lm_cptr, 1);
455
  PRINT1 ("\n");
456
 
457
  TEST_SIZE (  lm_ea_cptr, 4);
458
  TEST_SIZE ( *lm_ea_cptr, EA_PTRSIZE);
459
  TEST_SIZE (**lm_ea_cptr, 1);
460
  PRINT1 ("\n");
461
 
462
  TEST_SIZE (  ea_lm_cptr, EA_PTRSIZE);
463
  TEST_SIZE ( *ea_lm_cptr, 4);
464
  TEST_SIZE (**ea_lm_cptr, 1);
465
  PRINT1 ("\n");
466
 
467
  TEST_SIZE (  ea_ea_cptr, EA_PTRSIZE);
468
  TEST_SIZE ( *ea_ea_cptr, EA_PTRSIZE);
469
  TEST_SIZE (**ea_ea_cptr, 1);
470
  PRINT1 ("\n");
471
#endif
472
 
473
#if USE_EA_VAR
474
  TEST_SIZE (  lm_lm_cptr_ea, 4);
475
  TEST_SIZE ( *lm_lm_cptr_ea, 4);
476
  TEST_SIZE (**lm_lm_cptr_ea, 1);
477
  PRINT1 ("\n");
478
 
479
  TEST_SIZE (  lm_ea_cptr_ea, 4);
480
  TEST_SIZE ( *lm_ea_cptr_ea, EA_PTRSIZE);
481
  TEST_SIZE (**lm_ea_cptr_ea, 1);
482
  PRINT1 ("\n");
483
 
484
  TEST_SIZE (  ea_lm_cptr_ea, EA_PTRSIZE);
485
  TEST_SIZE ( *ea_lm_cptr_ea, 4);
486
  TEST_SIZE (**ea_lm_cptr_ea, 1);
487
  PRINT1 ("\n");
488
 
489
  TEST_SIZE (  ea_ea_cptr_ea, EA_PTRSIZE);
490
  TEST_SIZE ( *ea_ea_cptr_ea, EA_PTRSIZE);
491
  TEST_SIZE (**ea_ea_cptr_ea, 1);
492
  PRINT1 ("\n");
493
#endif
494
#endif
495
 
496
#if LEVEL3
497
#if USE_LOCAL_VAR
498
  TEST_SIZE (   lm_lm_lm_cptr, 4);
499
  TEST_SIZE (  *lm_lm_lm_cptr, 4);
500
  TEST_SIZE ( **lm_lm_lm_cptr, 4);
501
  TEST_SIZE (***lm_lm_lm_cptr, 1);
502
  PRINT1 ("\n");
503
 
504
  TEST_SIZE (   lm_lm_ea_cptr, 4);
505
  TEST_SIZE (  *lm_lm_ea_cptr, 4);
506
  TEST_SIZE ( **lm_lm_ea_cptr, EA_PTRSIZE);
507
  TEST_SIZE (***lm_lm_ea_cptr, 1);
508
  PRINT1 ("\n");
509
 
510
  TEST_SIZE (   lm_ea_lm_cptr, 4);
511
  TEST_SIZE (  *lm_ea_lm_cptr, EA_PTRSIZE);
512
  TEST_SIZE ( **lm_ea_lm_cptr, 4);
513
  TEST_SIZE (***lm_ea_lm_cptr, 1);
514
  PRINT1 ("\n");
515
 
516
  TEST_SIZE (   lm_ea_ea_cptr, 4);
517
  TEST_SIZE (  *lm_ea_ea_cptr, EA_PTRSIZE);
518
  TEST_SIZE ( **lm_ea_ea_cptr, EA_PTRSIZE);
519
  TEST_SIZE (***lm_ea_ea_cptr, 1);
520
  PRINT1 ("\n");
521
 
522
  TEST_SIZE (   ea_lm_lm_cptr, EA_PTRSIZE);
523
  TEST_SIZE (  *ea_lm_lm_cptr, 4);
524
  TEST_SIZE ( **ea_lm_lm_cptr, 4);
525
  TEST_SIZE (***ea_lm_lm_cptr, 1);
526
  PRINT1 ("\n");
527
 
528
  TEST_SIZE (   ea_lm_ea_cptr, EA_PTRSIZE);
529
  TEST_SIZE (  *ea_lm_ea_cptr, 4);
530
  TEST_SIZE ( **ea_lm_ea_cptr, EA_PTRSIZE);
531
  TEST_SIZE (***ea_lm_ea_cptr, 1);
532
  PRINT1 ("\n");
533
 
534
  TEST_SIZE (   ea_ea_lm_cptr, EA_PTRSIZE);
535
  TEST_SIZE (  *ea_ea_lm_cptr, EA_PTRSIZE);
536
  TEST_SIZE ( **ea_ea_lm_cptr, 4);
537
  TEST_SIZE (***ea_ea_lm_cptr, 1);
538
  PRINT1 ("\n");
539
 
540
  TEST_SIZE (   ea_ea_ea_cptr, EA_PTRSIZE);
541
  TEST_SIZE (  *ea_ea_ea_cptr, EA_PTRSIZE);
542
  TEST_SIZE ( **ea_ea_ea_cptr, EA_PTRSIZE);
543
  TEST_SIZE (***ea_ea_ea_cptr, 1);
544
  PRINT1 ("\n");
545
#endif
546
 
547
#if USE_EA_VAR
548
  TEST_SIZE (   lm_lm_lm_cptr_ea, 4);
549
  TEST_SIZE (  *lm_lm_lm_cptr_ea, 4);
550
  TEST_SIZE ( **lm_lm_lm_cptr_ea, 4);
551
  TEST_SIZE (***lm_lm_lm_cptr_ea, 1);
552
  PRINT1 ("\n");
553
 
554
  TEST_SIZE (   lm_lm_ea_cptr_ea, 4);
555
  TEST_SIZE (  *lm_lm_ea_cptr_ea, 4);
556
  TEST_SIZE ( **lm_lm_ea_cptr_ea, EA_PTRSIZE);
557
  TEST_SIZE (***lm_lm_ea_cptr_ea, 1);
558
  PRINT1 ("\n");
559
 
560
  TEST_SIZE (   lm_ea_lm_cptr_ea, 4);
561
  TEST_SIZE (  *lm_ea_lm_cptr_ea, EA_PTRSIZE);
562
  TEST_SIZE ( **lm_ea_lm_cptr_ea, 4);
563
  TEST_SIZE (***lm_ea_lm_cptr_ea, 1);
564
  PRINT1 ("\n");
565
 
566
  TEST_SIZE (   lm_ea_ea_cptr_ea, 4);
567
  TEST_SIZE (  *lm_ea_ea_cptr_ea, EA_PTRSIZE);
568
  TEST_SIZE ( **lm_ea_ea_cptr_ea, EA_PTRSIZE);
569
  TEST_SIZE (***lm_ea_ea_cptr_ea, 1);
570
  PRINT1 ("\n");
571
 
572
  TEST_SIZE (   ea_lm_lm_cptr_ea, EA_PTRSIZE);
573
  TEST_SIZE (  *ea_lm_lm_cptr_ea, 4);
574
  TEST_SIZE ( **ea_lm_lm_cptr_ea, 4);
575
  TEST_SIZE (***ea_lm_lm_cptr_ea, 1);
576
  PRINT1 ("\n");
577
 
578
  TEST_SIZE (   ea_lm_ea_cptr_ea, EA_PTRSIZE);
579
  TEST_SIZE (  *ea_lm_ea_cptr_ea, 4);
580
  TEST_SIZE ( **ea_lm_ea_cptr_ea, EA_PTRSIZE);
581
  TEST_SIZE (***ea_lm_ea_cptr_ea, 1);
582
  PRINT1 ("\n");
583
 
584
  TEST_SIZE (   ea_ea_lm_cptr_ea, EA_PTRSIZE);
585
  TEST_SIZE (  *ea_ea_lm_cptr_ea, EA_PTRSIZE);
586
  TEST_SIZE ( **ea_ea_lm_cptr_ea, 4);
587
  TEST_SIZE (***ea_ea_lm_cptr_ea, 1);
588
  PRINT1 ("\n");
589
 
590
  TEST_SIZE (   ea_ea_ea_cptr_ea, EA_PTRSIZE);
591
  TEST_SIZE (  *ea_ea_ea_cptr_ea, EA_PTRSIZE);
592
  TEST_SIZE ( **ea_ea_ea_cptr_ea, EA_PTRSIZE);
593
  TEST_SIZE (***ea_ea_ea_cptr_ea, 1);
594
  PRINT1 ("\n");
595
#endif
596
#endif
597
#endif
598
 
599
  if (errors)
600
    {
601
      PRINT3 ("%d error(s), %d test(s)\n", errors, num_tests);
602
      abort ();
603
    }
604
  else
605
    PRINT2 ("No errors, %d test(s)\n", num_tests);
606
 
607
  return 0;
608
}

powered by: WebSVN 2.1.0

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