-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathIFBUG.PL1
72 lines (51 loc) · 2.47 KB
/
IFBUG.PL1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
largetst:
procedure options (main);
/****************************************************************************/
/* This program uses each of the currently implemented features of PC-PL/1 */
/* in an attempt to expose any new or old or reintroduced compiler bugs. */
/****************************************************************************/
/****************************************************************************/
/* Modification History */
/****************************************************************************/
/* Who When What */
/* ------------------------------------------------------------------------ */
/* HWG 20-01-92 First version written */
/****************************************************************************/
% replace MAX_SIZE by 10;
% replace INN_SIZE by 5;
dcl 1 static_structure(MAX_SIZE) static,
2 s_element(INN_SIZE) bin(15), /* IN_SIZE gives BAD ERRORS ! */
2 x_coord bin(15),
2 y_coord bin(15);
dcl 1 auto_structure(MAX_SIZE) automatic,
2 a_element(INN_SIZE) bin(15),
2 x_coord bin(15),
2 y_coord bin(15);
dcl (I,J,K,L,M) bin(15) static;
dcl (i,j,k,l,m) bin(15) automatic;
dcl one bin(15);
/****************************************************************/
/* This test ensures that array/structure access is working OK */
/****************************************************************/
one = 1;
do I = 1 to MAX_SIZE; /* static array indexed by statics */
do J = 1 to INN_SIZE;
/*******************************************************/
/* The following assignments are semantically the same */
/* and should produce IDENTICAL code. */
/*******************************************************/
s_element(I,J) = 1;
s_element(I)(J) = 1;
static_structure(I).s_element(J) = 1;
static_structure.s_element(I,J) = 1;
static_structure.s_element(I)(J) = 1;
end;
end;
if I ^= MAX_SIZE + 1 then
do;
put skip (one) list ('Loop termination error 1');
one = 1;
end;
put skip(one) list('Loop 1 ended fine.');
end largetst;