Minor changes. Includes no$gmb sym name limit.
[fw/sdcc] / support / tests / dhrystone / dhry.c
1 /** Sanatised version of the dhrystone-2.1 test.
2
3     Modifications Michael Hope <michaelh@earthling.net>
4
5     This is derrived from the dhrystone-2.1.tar.gz tarball available
6     all over the net.  I sourced it from the Red Hat src rpm.
7
8     Modifications:
9     * Made it more ANSI compliant.
10     * Changed any array function arguments to pointers to make my 
11       compiler work.
12     * Removed malloc's for a couple of static arrays.
13     * Into one file.
14     * Proc_8 is a bit messy.  It originally took a 2 dim array, but
15       sdcc doesnt support this.  So the offsets are hard coded...
16
17     Notes:
18     * The comment at the start of Func_1 about the input being
19       H, R on the first call is wrong - Func_1 is first called
20       from Func_2 where the input is R, Y.  The test still succeeds.
21
22     References:
23     * http://www.netlib.org/performance/html/dhry.intro.html
24     * http://www.netlib.org/performance/html/dhry.data.col0.html
25
26     I couldnt find a copyright in the original - the most relevent
27     part follows:
28
29     A SPECIAL THANKS
30     I didn't write the DHRYSTONE benchmark.  Rheinhold Weicker did. He has
31     certainly provided us with a useful tool for benchmarking, and is
32     to be congratulated.
33
34     Rick Richardson
35     PC Research, Inc.
36     (201) 389-8963 (9-17 EST)
37     (201) 542-3734 (7-9,17-24 EST)
38     ...!uunet!pcrat!rick        (normal mail)
39     ...!uunet!pcrat!dry2        (results only)
40 */
41
42 #define NOENUM          1
43 #define NOSTRUCTASSIGN  1
44 #define REG
45
46 #include "dhry.h"
47 #include <string.h>
48 /** For printf */
49 #include <stdio.h>
50 /** For clock() */
51 #include <time.h>
52 #include <types.h>
53
54 /** Print the number of t-states this program has been executing for.
55     Optional :)
56 */
57 void _printTStates(void);
58
59 /** Set to one to print more messages about expected values etc. 
60  */
61 #define DEBUG   0
62
63 #if DEBUG
64 #define DPRINTF(_a)  printf _a
65 #else
66 #define DPRINTF(_a)
67 #endif
68
69 Rec_Pointer     Ptr_Glob,
70                 Next_Ptr_Glob;
71 int             Int_Glob;
72 Boolean         Bool_Glob;
73 char            Ch_1_Glob,
74                 Ch_2_Glob;
75 int             Arr_1_Glob [50];
76 int             Arr_2_Glob [50] [50];
77
78 /* Used instead of malloc() */
79 static Rec_Type _r[2];
80
81 void Proc_1 (REG Rec_Pointer Ptr_Val_Par);
82 void Proc_2 (One_Fifty *Int_Par_Ref);
83 void Proc_5 (void);
84 void Proc_4 (void);
85 void Proc_7 (One_Fifty Int_1_Par_Val, One_Fifty Int_2_Par_Val, One_Fifty *Int_Par_Ref);
86 void Proc_8 (int *Arr_1_Par_Ref, int *Arr_2_Par_Ref,
87              int Int_1_Par_Val, int Int_2_Par_Val);
88 void Proc_6 (Enumeration Enum_Val_Par, Enumeration *Enum_Ref_Par);
89 void Proc_3 (Rec_Pointer *Ptr_Ref_Par);
90 Enumeration Func_1 (Capital_Letter Ch_1_Par_Val, Capital_Letter Ch_2_Par_Val);
91 Boolean Func_2 (char *Str_1_Par_Ref, char *Str_2_Par_Ref);
92 Boolean Func_3 (Enumeration Enum_Par_Val);
93
94 unsigned getsp(void);
95
96 int main(void)
97 {
98     One_Fifty       Int_1_Loc;
99     REG   One_Fifty       Int_2_Loc;
100     One_Fifty       Int_3_Loc;
101     REG   Capital_Letter Ch_Index;
102     Enumeration     Enum_Loc;
103     Str_30          Str_1_Loc;
104     Str_30          Str_2_Loc;
105     REG   int             Run_Index;
106     REG   int             Number_Of_Runs;
107     unsigned runTime;
108
109     printf("[dhry]\n");
110
111     Next_Ptr_Glob = &_r[0];
112     Ptr_Glob = &_r[1];
113
114     Ptr_Glob->Ptr_Comp                    = Next_Ptr_Glob;
115     Ptr_Glob->Discr                       = Ident_1;
116     Ptr_Glob->variant.var_1.Enum_Comp     = Ident_3;
117     Ptr_Glob->variant.var_1.Int_Comp      = 40;
118
119     strcpy(Ptr_Glob->variant.var_1.Str_Comp, 
120             "DHRYSTONE PROGRAM, SOME STRING");
121     strcpy (Str_1_Loc, "DHRYSTONE PROGRAM, 1'ST STRING");
122
123     Arr_2_Glob [8][7] = 10;
124
125     /* Was missing in published program. Without this statement,    */
126     /* Arr_2_Glob [8][7] would have an undefined value.             */
127     /* Warning: With 16-Bit processors and Number_Of_Runs > 32000,  */
128     /* overflow may occur for this array element.                   */
129
130     /* 32766 is the highest value for a 16 bitter */
131     Number_Of_Runs = 10000;
132
133     runTime = clock();
134
135     /* Main test loop */
136     for (Run_Index = 1; Run_Index <= Number_Of_Runs; ++Run_Index) {
137         DPRINTF(("Run_Index = %d\n", Run_Index));
138         if (!(Run_Index & 1023))
139             printf("Loops: %u\r", Run_Index);
140         Proc_5();
141         Proc_4();
142         /* Ch_1_Glob == 'A', Ch_2_Glob == 'B', Bool_Glob == true */
143         DPRINTF(("Ch_1_Glob '%c' == 'A', Ch_2_Glob '%c' == 'B', Bool_Glob %d == 1\n", Ch_1_Glob, Ch_2_Glob, Bool_Glob));
144
145         Int_1_Loc = 2;
146         Int_2_Loc = 3;
147         strcpy (Str_2_Loc, "DHRYSTONE PROGRAM, 2'ND STRING");
148         Enum_Loc = Ident_2;
149         Bool_Glob = ! Func_2 (Str_1_Loc, Str_2_Loc);
150         /* Bool_Glob == 1 */
151         DPRINTF(("Bool_Glob %d == 1, Int_1_Loc %d == 2, Int_2_Loc %d == 3\n", Bool_Glob, Int_1_Loc, Int_2_Loc));
152         while (Int_1_Loc < Int_2_Loc)  /* loop body executed once */
153             {
154                 DPRINTF(("m.1 Executes once.\n"));
155                 Int_3_Loc = 5 * Int_1_Loc - Int_2_Loc;
156                 /* Int_3_Loc == 7 */
157                 DPRINTF(("Int_3_Loc %d == 7\n", Int_3_Loc));
158                 DPRINTF(("Proc_7\n"));
159                 Proc_7 (Int_1_Loc, Int_2_Loc, &Int_3_Loc);
160                 /* Int_3_Loc == 7 */
161                 Int_1_Loc += 1;
162             } /* while */
163         DPRINTF(("m.2 Check above executed once.\n"));
164         /* Int_1_Loc == 3, Int_2_Loc == 3, Int_3_Loc == 7 */
165         DPRINTF(("Int_1_Loc %d == 3, Int_2_Loc %d == 3, Int_3_Loc %d == 7\n",
166                Int_1_Loc, Int_2_Loc, Int_3_Loc));
167
168         DPRINTF(("Proc_8\n"));
169         Proc_8 (Arr_1_Glob, (int *)Arr_2_Glob, Int_1_Loc, Int_3_Loc);
170         /* Int_Glob == 5 */
171         DPRINTF(("Int_Glob %d == 5\n", Int_Glob));
172         DPRINTF(("Proc_1\n"));
173         Proc_1 (Ptr_Glob);
174         for (Ch_Index = 'A'; Ch_Index <= Ch_2_Glob; ++Ch_Index)
175             /* loop body executed twice */
176             {
177                 DPRINTF(("Func_1\n"));
178                 if (Enum_Loc == Func_1 (Ch_Index, 'C'))
179                     /* then, not executed */
180                     {
181                         DPRINTF(("Proc_6\n"));
182                         Proc_6 (Ident_1, &Enum_Loc);
183                         strcpy (Str_2_Loc, "DHRYSTONE PROGRAM, 3'RD STRING");
184                         Int_2_Loc = Run_Index;
185                         Int_Glob = Run_Index;
186                     }
187             }
188         /* Int_1_Loc == 3, Int_2_Loc == 3, Int_3_Loc == 7 */
189         DPRINTF(("Int_1_Loc %d == 3, Int_2_Loc %d == 3, Int_3_Loc %d == 7\n",
190                Int_1_Loc, Int_2_Loc, Int_3_Loc));
191
192         Int_2_Loc = Int_2_Loc * Int_1_Loc;
193         Int_1_Loc = Int_2_Loc / Int_3_Loc;
194         Int_2_Loc = 7 * (Int_2_Loc - Int_3_Loc) - Int_1_Loc;
195         /* Int_1_Loc == 1, Int_2_Loc == 13, Int_3_Loc == 7 */
196         DPRINTF(("Int_1_Loc %d == 1, Int_2_Loc %d == 13, Int_3_Loc %d == 7\n",
197                Int_1_Loc, Int_2_Loc, Int_3_Loc));
198         DPRINTF(("Proc_2\n"));
199         Proc_2 (&Int_1_Loc);
200         /* Int_1_Loc == 5 */
201         DPRINTF(("Int_1_Loc %d == 5\n", Int_1_Loc));
202         DPRINTF(("Looping.\n"));
203     } /* loop "for Run_Index" */
204
205     _printTStates();
206
207     printf("Run_Index = %d\n", Run_Index);
208
209     runTime = clock() - runTime;
210
211 #if 1
212     printf ("Execution ends\n");
213     printf ("\n");
214     printf ("Final values of the variables used in the benchmark:\n");
215     printf ("\n");
216     printf ("Int_Glob:            %d\n", Int_Glob);
217     printf ("        should be:   %d\n", (int)5);
218     printf ("Bool_Glob:           %d\n", Bool_Glob);
219     printf ("        should be:   %d\n", (int)1);
220     printf ("Ch_1_Glob:           %c\n", Ch_1_Glob);
221     printf ("        should be:   %c\n", 'A');
222     printf ("Ch_2_Glob:           %c\n", Ch_2_Glob);
223     printf ("        should be:   %c\n", 'B');
224     printf ("Arr_1_Glob[8]:       %d\n", Arr_1_Glob[8]);
225     printf ("        should be:   %d\n", (int)7);
226 #if 0
227     printf ("Arr_2_Glob[8][7]:    %d\n", Arr_2_Glob[8][7]);
228 #else
229     //    printf ("Arr_2_Glob[8][7]:    %d\n", Arr_2_Glob[8][7]);
230 #endif
231     printf ("        should be:   Number_Of_Runs + 10\n");
232     printf ("Ptr_Glob->\n");
233     printf ("  Ptr_Comp:          %d\n", (int) Ptr_Glob->Ptr_Comp);
234     printf ("        should be:   (implementation-dependent)\n");
235     printf ("  Discr:             %d\n", (int)Ptr_Glob->Discr);
236     printf ("        should be:   %d\n", (int)0);
237     printf ("  Enum_Comp:         %d\n", (int)Ptr_Glob->variant.var_1.Enum_Comp);
238     printf ("        should be:   %d\n", (int)2);
239     printf ("  Int_Comp:          %d\n", (int)Ptr_Glob->variant.var_1.Int_Comp);
240     printf ("        should be:   %d\n", (int)17);
241     printf ("  Str_Comp:          %s\n", (char *)Ptr_Glob->variant.var_1.Str_Comp);
242     printf ("        should be:   DHRYSTONE PROGRAM, SOME STRING\n");
243     printf ("Next_Ptr_Glob->\n");
244     printf ("  Ptr_Comp:          %d\n", (int) Next_Ptr_Glob->Ptr_Comp);
245     printf ("        should be:   (implementation-dependent), same as above\n");
246     printf ("  Discr:             %d\n", Next_Ptr_Glob->Discr);
247     printf ("        should be:   %d\n", (int)0);
248     printf ("  Enum_Comp:         %d\n", Next_Ptr_Glob->variant.var_1.Enum_Comp);
249     printf ("        should be:   %d\n", (int)1);
250     printf ("  Int_Comp:          %d\n", Next_Ptr_Glob->variant.var_1.Int_Comp);
251     printf ("        should be:   %d\n", (int)18);
252     printf ("  Str_Comp:          %s\n",
253             Next_Ptr_Glob->variant.var_1.Str_Comp);
254     printf ("        should be:   DHRYSTONE PROGRAM, SOME STRING\n");
255     printf ("Int_1_Loc:           %d\n", Int_1_Loc);
256     printf ("        should be:   %d\n", (int)5);
257     printf ("Int_2_Loc:           %d\n", Int_2_Loc);
258     printf ("        should be:   %d\n", (int)13);
259     printf ("Int_3_Loc:           %d\n", Int_3_Loc);
260     printf ("        should be:   %d\n", (int)7);
261     printf ("Enum_Loc:            %d\n", Enum_Loc);
262     printf ("        should be:   %d\n", (int)1);
263     printf ("Str_1_Loc:           %s\n", Str_1_Loc);
264     printf ("        should be:   DHRYSTONE PROGRAM, 1'ST STRING\n");
265     printf ("Str_2_Loc:           %s\n", Str_2_Loc);
266     printf ("        should be:   DHRYSTONE PROGRAM, 2'ND STRING\n");
267     printf ("\n");
268 #endif
269     printf("Dhrystones/s = %u\n", Number_Of_Runs / (runTime/CLOCKS_PER_SEC));
270     printf("MIPS = d/s/1757 = (sigh, need floats...)\n");
271     _printTStates();
272     printf("Time: %u ticks\n", runTime);
273 }
274
275 void Proc_1 (REG Rec_Pointer Ptr_Val_Par)
276 /* executed once */
277 {
278     REG Rec_Pointer Next_Record = Ptr_Val_Par->Ptr_Comp;  
279     /* == Ptr_Glob_Next */
280     /* Local variable, initialized with Ptr_Val_Par->Ptr_Comp,    */
281     /* corresponds to "rename" in Ada, "with" in Pascal           */
282   
283     structassign (*Ptr_Val_Par->Ptr_Comp, *Ptr_Glob); 
284     Ptr_Val_Par->variant.var_1.Int_Comp = 5;
285     Next_Record->variant.var_1.Int_Comp 
286         = Ptr_Val_Par->variant.var_1.Int_Comp;
287     Next_Record->Ptr_Comp = Ptr_Val_Par->Ptr_Comp;
288     Proc_3 (&Next_Record->Ptr_Comp);
289     /* Ptr_Val_Par->Ptr_Comp->Ptr_Comp 
290        == Ptr_Glob->Ptr_Comp */
291     if (Next_Record->Discr == Ident_1)
292         /* then, executed */
293         {
294             Next_Record->variant.var_1.Int_Comp = 6;
295             Proc_6 (Ptr_Val_Par->variant.var_1.Enum_Comp, 
296                     &Next_Record->variant.var_1.Enum_Comp);
297             Next_Record->Ptr_Comp = Ptr_Glob->Ptr_Comp;
298             Proc_7 (Next_Record->variant.var_1.Int_Comp, 10, 
299                     &Next_Record->variant.var_1.Int_Comp);
300         }
301     else /* not executed */
302         structassign (*Ptr_Val_Par, *Ptr_Val_Par->Ptr_Comp);
303 } /* Proc_1 */
304
305
306 void Proc_2 (One_Fifty *Int_Par_Ref)
307     /******************/
308     /* executed once */
309     /* *Int_Par_Ref == 1, becomes 4 */
310 {
311     One_Fifty  Int_Loc;  
312     Enumeration   Enum_Loc;
313
314     DPRINTF(("-> Proc_2\n"));
315
316     Int_Loc = *Int_Par_Ref + 10;
317     do {
318         DPRINTF(("1"));
319         /* executed once */
320         if (Ch_1_Glob == 'A')
321             /* then, executed */
322             {
323                 DPRINTF(("2"));
324                 Int_Loc -= 1;
325                 *Int_Par_Ref = Int_Loc - Int_Glob;
326                 Enum_Loc = Ident_1;
327             } /* if */
328         DPRINTF(("3"));
329     } while (Enum_Loc != Ident_1); /* true */
330     DPRINTF(("Proc_2 done.\n"));
331 } /* Proc_2 */
332
333
334 void Proc_3 (Rec_Pointer *Ptr_Ref_Par)
335     /******************/
336     /* executed once */
337     /* Ptr_Ref_Par becomes Ptr_Glob */
338 {
339     if (Ptr_Glob != Null)
340         /* then, executed */
341         *Ptr_Ref_Par = Ptr_Glob->Ptr_Comp;
342     Proc_7 (10, Int_Glob, &Ptr_Glob->variant.var_1.Int_Comp);
343 } /* Proc_3 */
344
345 void Proc_4 (void) /* without parameters */
346     /*******/
347     /* executed once */
348 {
349     Boolean Bool_Loc;
350
351     DPRINTF(("-> Proc_4\n"));
352     Bool_Loc = Ch_1_Glob == 'A';
353     Bool_Glob = Bool_Loc | Bool_Glob;
354     Ch_2_Glob = 'B';
355     DPRINTF(("Expect Ch_1_Glob '%c' == 'A'\n", (char)Ch_1_Glob));
356     DPRINTF(("       Ch_2_Glob '%c' == 'B'\n", (char)Ch_2_Glob));
357     DPRINTF(("       Bool_Loc %d == 1\n", (unsigned)Bool_Loc));
358     DPRINTF(("       Bool_Glob %d == 1\n", (unsigned)Bool_Glob));
359 } /* Proc_4 */
360
361
362 void Proc_5 () /* without parameters */
363     /*******/
364     /* executed once */
365 {
366     Ch_1_Glob = 'A';
367     Bool_Glob = false;
368 } /* Proc_5 */
369
370 void Proc_6 (Enumeration Enum_Val_Par, Enumeration *Enum_Ref_Par)
371     /*********************************/
372     /* executed once */
373     /* Enum_Val_Par == Ident_3, Enum_Ref_Par becomes Ident_2 */
374
375 {
376     *Enum_Ref_Par = Enum_Val_Par;
377     if (! Func_3 (Enum_Val_Par))
378         /* then, not executed */
379         *Enum_Ref_Par = Ident_4;
380     switch (Enum_Val_Par)
381         {
382         case Ident_1: 
383             *Enum_Ref_Par = Ident_1;
384             break;
385         case Ident_2: 
386             if (Int_Glob > 100)
387                 /* then */
388                 *Enum_Ref_Par = Ident_1;
389             else *Enum_Ref_Par = Ident_4;
390             break;
391         case Ident_3: /* executed */
392             *Enum_Ref_Par = Ident_2;
393             break;
394         case Ident_4: break;
395         case Ident_5: 
396             *Enum_Ref_Par = Ident_3;
397             break;
398         } /* switch */
399 } /* Proc_6 */
400
401
402 /*************************************************/
403 /* executed three times                                         */
404 /* first call:      Ch_1_Par_Val == 'H', Ch_2_Par_Val == 'R'    */
405 /* second call:     Ch_1_Par_Val == 'A', Ch_2_Par_Val == 'C'    */
406 /* third call:      Ch_1_Par_Val == 'B', Ch_2_Par_Val == 'C'    */
407 Enumeration Func_1 (Capital_Letter Ch_1_Par_Val, Capital_Letter Ch_2_Par_Val)
408 {
409     Capital_Letter        Ch_1_Loc;
410     Capital_Letter        Ch_2_Loc;
411
412     DPRINTF(("-> Func_1\n"));
413     DPRINTF(("  Inputs: Ch_1_Par_Val '%c' == { R, A, B }\n", (char)Ch_1_Par_Val));
414     DPRINTF(("          Ch_2_Par_Val '%c' == { Y, C, C }\n", (char)Ch_2_Par_Val));
415
416     Ch_1_Loc = Ch_1_Par_Val;
417     Ch_2_Loc = Ch_1_Loc;
418     if (Ch_2_Loc != Ch_2_Par_Val) {
419         /* then, executed */
420         return (Ident_1);
421     }
422     else  /* not executed */
423         {
424             Ch_1_Glob = Ch_1_Loc;
425             return (Ident_2);
426         }
427 } /* Func_1 */
428
429 Boolean Func_3 (Enumeration Enum_Par_Val)
430     /***************************/
431     /* executed once        */
432     /* Enum_Par_Val == Ident_3 */
433 {
434     Enumeration Enum_Loc;
435
436     Enum_Loc = Enum_Par_Val;
437     if (Enum_Loc == Ident_3)
438         /* then, executed */
439         return (true);
440     else /* not executed */
441         return (false);
442 } /* Func_3 */
443
444 void Proc_7 (One_Fifty Int_1_Par_Val, One_Fifty Int_2_Par_Val, One_Fifty *Int_Par_Ref)
445     /**********************************************/
446     /* executed three times                                      */ 
447     /* first call:      Int_1_Par_Val == 2, Int_2_Par_Val == 3,  */
448     /*                  Int_Par_Ref becomes 7                    */
449     /* second call:     Int_1_Par_Val == 10, Int_2_Par_Val == 5, */
450     /*                  Int_Par_Ref becomes 17                   */
451     /* third call:      Int_1_Par_Val == 6, Int_2_Par_Val == 10, */
452     /*                  Int_Par_Ref becomes 18                   */
453 {
454     One_Fifty Int_Loc;
455
456     Int_Loc = Int_1_Par_Val + 2;
457     *Int_Par_Ref = Int_2_Par_Val + Int_Loc;
458 } /* Proc_7 */
459
460 /*void Proc_8 (Arr_1_Dim Arr_1_Par_Ref, Arr_2_Dim Arr_2_Par_Ref, 
461   int Int_1_Par_Val, int Int_2_Par_Val)*/
462 void Proc_8 (int *Arr_1_Par_Ref, int *Arr_2_Par_Ref,
463              int Int_1_Par_Val, int Int_2_Par_Val)
464 {
465     REG One_Fifty Int_Index;
466     REG One_Fifty Int_Loc;
467
468     DPRINTF(("-> Proc_8\n"));
469     Int_Loc = Int_1_Par_Val + 5;
470     Arr_1_Par_Ref [Int_Loc] = Int_2_Par_Val;
471     DPRINTF(("Int_Loc %d == 8 Int_2_Par_Val %d == 7\n", Int_Loc, Int_2_Par_Val));
472
473     Arr_1_Par_Ref [Int_Loc+1] = Arr_1_Par_Ref [Int_Loc];
474     Arr_1_Par_Ref [Int_Loc+30] = Int_Loc;
475     for (Int_Index = Int_Loc; Int_Index <= Int_Loc+1; ++Int_Index)
476         Arr_2_Par_Ref [Int_Loc*50 + Int_Index] = Int_Loc;
477     Arr_2_Par_Ref [Int_Loc * 50 + Int_Loc-1] += 1;
478     Arr_2_Par_Ref [(Int_Loc+20 *50) + Int_Loc] = Arr_1_Par_Ref [Int_Loc];
479     Int_Glob = 5;
480     DPRINTF(("Arr_1_Glob[8] %d == 7\n", Arr_1_Par_Ref[8]));
481 }
482
483 /*********************************************************************/
484 /* executed once      */
485 /* Int_Par_Val_1 == 3 */
486 /* Int_Par_Val_2 == 7 */
487 Boolean Func_2 (char *Str_1_Par_Ref, char *Str_2_Par_Ref)
488     /*************************************************/
489     /* executed once */
490     /* Str_1_Par_Ref == "DHRYSTONE PROGRAM, 1'ST STRING" */
491     /* Str_2_Par_Ref == "DHRYSTONE PROGRAM, 2'ND STRING" */
492 {
493     REG One_Thirty        Int_Loc;
494     Capital_Letter    Ch_Loc;
495
496     DPRINTF(("-> Func_2\n"));
497     DPRINTF(("  Inputs Str_1_Par_Ref \"%s\" = \"DHRYSTONE PROGRAM, 1'ST STRING\"\n", Str_1_Par_Ref));
498     DPRINTF(("         Str_2_Par_Ref \"%s\" = \"DHRYSTONE PROGRAM, 2'ND STRING\"\n", Str_2_Par_Ref));
499
500     Int_Loc = 2;
501
502     while (Int_Loc <= 2) {
503         if (Func_1 (Str_1_Par_Ref[Int_Loc],
504                     Str_2_Par_Ref[Int_Loc+1]) == Ident_1)
505             /* then, executed */
506             {
507                 DPRINTF(("  2.3 Then OK.\n"));
508                 Ch_Loc = 'A';
509                 Int_Loc += 1;
510             } /* if, while */
511         else {
512             DPRINTF(("  2.2 Error.\n"));
513         }
514     }
515     if (Ch_Loc >= 'W' && Ch_Loc < 'Z') {
516         /* then, not executed */
517         DPRINTF((" 2.4 Error\n"));
518         Int_Loc = 7;
519     }
520     if (Ch_Loc == 'R') {
521         /* then, not executed */
522         DPRINTF((" 2.5 Error\n"));
523         return (true);
524     }
525     else /* executed */
526         {
527             DPRINTF(("Str_1_Par_Ref = \"%s\", Str_2_Par_Ref = \"%s\"\n",
528                    Str_1_Par_Ref, Str_2_Par_Ref));
529             if (strcmp (Str_1_Par_Ref, Str_2_Par_Ref) > 0)
530                 /* then, not executed */
531                 {
532                     DPRINTF((" 2.5 Error diff=%d\n", strcmp(Str_1_Par_Ref, Str_2_Par_Ref)));
533                     Int_Loc += 7;
534                     Int_Glob = Int_Loc;
535                     return (true);
536                 }
537             else {
538                 /* executed */
539                 DPRINTF((" 2.6 OK\n"));
540                 return (false);
541             }
542         } /* if Ch_Loc */
543 } /* Func_2 */