1
2 09/21/87 pl1
3 Known errors in the current release of pl1.
4 # Associated TR's
5 Description
6
7 2187 phx16267
8 Internal compiler error 248 occurs when the right-hand-side for an
9 assignment to the pseudo_variable pageno is an expression instead of a
10 constant.
11 pageno_bug: proc;
12 dcl pp fixed bin 35 init 99;
13 dcl pageno builtin;
14 dcl sysprint print file;
15 pagenosysprint = pp;
16 put file sysprint edit "Test" pagenosysprint a;
17 end;
18
19 ERROR 248, SEVERITY 3 ON LINE 5
20 Compiler error: Bad input "pp" to the conversion routine "convert".
21 SOURCE: pagenosysprint = pp;
22
23 PL/1 should allow an expression as the right-hand-side for an
24 assignment to the pseudo-variable pageno. The AM83 manual Page 10-12
25 does not disallow them.
26
27 The affected module is builtin.pl1 .
28
29 2186 phx17798
30 A meaningful error message should be printed at compile time when one
31 attempts to change the value of a variable declared with "options
32 constant" for the duration of a program.
33 change_a_constant: proc;
34 dcl a fixed bin init 5; /* regular variable */
35 dcl c fixed bin init 2 internal static options constant;
36 /* constant */
37 dcl ioa_ entry options variable;
38
39 call ioa_ "a = ^d^/c = ^d" a c;
40 c = a;
41 call ioa_ "a = ^d^/c = ^d" a c;
42 return;
43 end change_a_constant;
44 -->pl1 change_a_constant
45 PL/I 27d
46 -->change_a_constant
47 a = 5
48 c = 2
49
50 Error: no_write_permission condition by >udd>SysMaint>Housley>tr>change_a_constant|45 line 10
51 referencing >udd>SysMaint>Housley>tr>change_a_constant|0
52
53 - level 2,10->rl
54 -->sa change_a_constant rew
55 -->change_a_constant
56 a = 5
57 c = 2
58 a = 5
59 c = 5
60 -->
61
62 2185 phx20041 phx20035
63 Compiling bound_log_tools_.s::summarize_sys_log.pl1 generates bad code
64 for PL/1 29. The compiler assumes the value in the index register will
65 remain valid across an external call to iox_$put_chars when in fact it
66 doesn't.
67
68 Code generated from line 1136:
69 call iox_$put_chars switches selectors slx.switchx.iocb_ptr addwordno addr text_buffer 1
70 length text_buffer 0;
71
72 012561 aa 040000 7270 07 lxl7 16384,dl
73 012562 aa 6 25502 2361 17 ldq pr6|11074,7 slx
74 012563 aa 000003 7360 00 qls 3
75 012564 aa 6 37734 2361 06 ldq pr6|16348,ql selectors.switchx
76 012565 aa 000004 7360 00 qls 4
77 012566 aa 6 20574 3735 17 epp7 pr6|8572,7 text_buffer
78 012567 aa 7 00000 3521 00 epp2 pr7|0
79 012570 aa 000001 0520 03 adwp2 1,du
80 012571 aa 6 27250 2521 17 spri2 pr6|11944,7
81 012572 aa 000000 6260 06 eax6 0,ql
82 012573 aa 6 20574 2361 17 ldq pr6|8572,7 text_buffer
83 012574 aa 6 27224 7561 17 stq pr6|11924,7
84 012575 aa 6 27332 4501 17 stz pr6|11994,7
85 012576 aa 067226 7210 07 lxl1 28310,dl
86 012577 aa 6 00536 3521 16 epp2 pr6|350,6 switches.iocb_ptr
87 012600 aa 6 00002 2521 11 spri2 pr6|2,1
88 012601 aa 6 27250 3521 17 epp2 pr6|11944,7
89 012602 aa 6 00004 2521 11 spri2 pr6|4,1
90 012603 aa 6 27224 3521 17 epp2 pr6|11924,7
91 012604 aa 6 00006 2521 11 spri2 pr6|6,1
92 012605 aa 6 27332 3521 17 epp2 pr6|11994,7
93 012606 aa 6 00010 2521 11 spri2 pr6|8,1
94 012607 aa 6 00000 6211 11 eax1 pr6|0,1
95 012610 aa 020000 4310 07 fld 8192,dl
96 012611 aa 6 00044 3701 20 epp4 pr6|36,*
97 012612 la 4 00126 3521 20 epp2 pr4|86,* iox_$put_chars
98 012613 aa 040000 7270 07 lxl7 16384,dl
99 012614 aa 6 27334 6535 17 spri7 pr6|11996,7
100 012615 aa 0 00623 7001 00 tsx0 pr0|403 call_ext_out
101 STATEMENT 1 ON LINE 1137
102 if switches selectors slx.switchx.prev_message_ptr ^= null
103 then call log_read_$free_message opt.log_read_ptr switches selectors slx.switchx.prev_message_ptr;
104
105 012616 aa 6 25502 2361 17 ldq pr6|11074,7 slx
106 012617 aa 000003 7360 00 qls 3
107 012620 aa 6 37734 2361 06 ldq pr6|16348,ql selectors.switchx
108 012621 aa 000004 7360 00 qls 4
109 012622 aa 6 00534 2371 06 ldaq pr6|348,ql switches.prev_message_ptr
110
111 After the external call to iox_$put_chars at line 1137, it attempts
112 to load the value of the variable "slx" into the "q" register. It does
113 so by using an offset in register x7. However, it has made no
114 provision for the possibility that the contents of x7 might have been
115 destroyed during the external call. In this case the value of x7 does
116 get trashed. Therefore, the program sometimes faults, and always get
117 erroneous results.
118
119 Proposed solution:
120 After the external call, x7 should be loaded with correct
121 value. Insert an "lxl7 16384,dl" before 12616.
122
123 2184 phx18993
124 The pl1 compiler generates incorrect code when concatenating a single
125 character to the end of a varying character whose length is an
126 expression.
127 test: procedure;
128 dcl string char1024 varying;
129 dcl sp pointer;
130 dcl l2 fixed bin35 init512;
131 dcl c charl2*2 varying based sp;
132 sp = addrstring;
133 c = "";
134 c = c || "a";
135 return;
136 end test;
137
138 The code generated for statement 8 are as follows:
139 000027 aa 6 00504 2361 00 ldq pr6|324 l2
140 000030 aa 000002 4020 07 mpy 2,dl
141 000031 aa 6 00506 7571 00 staq pr6|326
142 000032 aa 7 00000 2361 00 ldq pr7|0 c
143 000033 aa 6 00511 1161 00 cmpq pr6|329
144 000034 aa 000005 6050 04 tpl 5,ic 000041
145 000035 aa 7 00000 0541 00 aos pr7|0 c
146 000036 aa 040 106 100 404 mlr ic,prql,fill040
147 000037 aa 000004 00 0001 desc9a 4,1 000042 = 141000000000
148 000040 aa 7 00001 00 0001 desc9a pr7|1,1 c
149
150 When concatenating a single character to the end of varying character
151 string whose length is an expression, the compiler evaluates the
152 expression for the length and stores it in a stack temporary. It then
153 adds one to the current length of the varying character string and
154 stores it in a register. It compares these two values to see if the
155 resulting character string is too long in which it will be truncated
156 in this case the truncation is not taken place since it has added only
157 one character to the string. However, the compiler does not use the
158 same stack temporary to store the computed length of the string. The
159 result depends on what is in that other stack location. Sometimes it
160 works normally, and sometimes the concatenation is bypasses because the
161 code thinks the string should be truncated.
162
163 2183 phx14895
164 PL/1 compiler may fail to keep track of the state of the indicators and
165 generates unexpected result of the trunc operator. An input value of
166 11 for the following program demonstates the problem:
167 main_: proc;
168 dcl sysin sysprint file;
169 dcl r float bin;
170 dcl i j n fixed bin;
171 put skip list ">>";
172 get list i;
173 r = i;
174 do while r > 10;
175 r = r/10;
176 end;
177 n = trunc r;
178 put skip edit "Input="r a f82;
179 put skip edit "Trunc="n a f6;
180 end main_;
181
182 2182 phx16456
183 Optimizer incorrectly stores data for controlled external structure.
184 After the "exponent underflow" error is signalled at run time, the test
185 program is an infinite loop.
186
187 Test Paths: >udd>TR>TR_tc>tc1>run_bug.pl1 >udd>TR>TR_tc>tc1>s.pl1
188 >udd>TR>TR_tc>tc1>run_contour_staircase.pl1
189
190 2181 phx18441
191 PL/1 does not warn about qualified references to substr builtin and
192 produces incorrect result.
193
194 main_ : proc;
195 dcl xptr yptr pointer;
196 dcl ioa_ entry optionsvariable;
197 dcl x char 4 init "1234";
198 dcl xb char 4 based xptr;
199 dcl y char 4 init "abcd";
200 dcl yb char 4 based yptr;
201 dcl addr substr builtin;
202 xptr = addr y;
203 yptr = addr x;
204 call ioa_ "x = ^a" substr yptr -> xb 1 1;
205 call ioa_ "x = ^a" yptr -> substr xb 1 1;
206 call ioa_ "y = ^a" substr xptr -> yb 1 1;
207 call ioa_ "y = ^a" xptr -> substr yb 11;
208 return;
209 end main_;
210
211 The incorrect output are:
212 x = 1
213 x = a
214 y = a
215 y = 1
216
217 2180 phx18973
218 pl1.dcl declares mhcs_$get_seg_usage incorrectly. The last argument
219 which is also fixed bin 35 is missing from the declaration.
220
221 Proposed solution:
222 Update the entry in pl1.dcl as follows:
223 dcl mhcs_$get_seg_usage entry char* char* fixed
224 bin35 fixed bin35;
225
226 2179 phx14646
227 PL/1 complex float bin 63 arithmetic is unacceptably inefficient.
228 The ineffiencies is due to the overheads in the call to the
229 complex_binary_op_ external entry.
230
231 2178 phx19186
232 Incorrect result when a negative bit offset is given as an argument of
233 the add_bit_offset_ subroutine or the addbitno PL/1 builtin. The
234 following test program illustrates the problem:
235 bit_offset_bug: proc;
236 dcl fill1 fixed bin;
237 dcl a fixed bin;
238 dcl fill2 fixed bin;
239 dcl p ptr;
240 dcl add_bit_offset_ entry ptr fixed bin 24 returns ptr reducible;
241 dcl ioa_ entry options variable;
242 dcl addbitno addr builtin;
243
244 p = addr a;
245 call ioa_ "^p" p;
246 p = add_bit_offset_ p -1;
247 call ioa_ "^p" p;
248 p = addr a;
249 p = addbitno p -1;
250 call ioa_ "^p" p;
251 end;
252
253 THE OUTPUT:
254 234|13001
255 234|63116227
256 234|63116227
257
258 2177 phx14717
259 Code generation bug when compiling with "-optimize" option. In some
260 cases, when a varying string array is declared at more than 16 K of the
261 index used, the compiler generates lxl and stq instructions between
262 cmpc and tnz instructions of a IF statement that changes the condition
263 codes. For example, if we put a call statement inside the IF_THEN
264 statement, the code generated for the condition will be very different.
265 Therefore the result of the comparison is also changed. The following
266 program illustrates the problem:
267 main_: proc;
268 dcl it fixed bin init 1;
269 dcl blanc char 4 init 4" ";
270 dcl tab1 16500 char 4;
271 dcl tsymb 5 char 4 varying;
272 dcl ioa_ entry options variable;
273 tab1 it = "";
274 tsymb it = "";
275 if tsymb it = blanc
276 then do;
277 tsymb it = "tex1";
278 /* With the call statement, the condition code will be changed */
279 end;
280 call ioa_ "it= ^d tsymbit= ^a" it tsymb it;
281 end;
282
283 2176 phx15171
284 The storage type of f format item in a PL/1 put edit statement affects
285 the formatted output. For example, the options constant in the
286 following program seem to make a difference to PL/1 IO.
287 test: proc;
288 dcl i fixed bin;
289 dcl item fixed bin init 4;
290 dcl oay3 fixed bin init 123;
291 dcl way3 fixed bin internal static options constant init 123;
292 do i = 1 to 3;
293 put skip edit item "XXX" item f6oayi a3 f6wayi;
294 end;
295 end;
296
297 4.0XXX 4.0
298 4.00XXX 4.0
299 4.000XXX 4.0
300
301 2175 phx15861
302 Results of x= before x"."; statement depends on presence or absence
303 of a call ioa_ statement. Program t1.pl1 will produce the desired
304 result '99 ' while t2 produces '99 \000'.
305
306 t1: proc;
307 dcl x char5;
308 dcl ioa_ entry options variable;
309 dcl sysprint file;
310 x= "99";
311 x= before x ".";
312 put skip1 edit "'"x"'"a1a5a1;
313 put skip1;
314 call ioa_ "^/'^5a'"x;
315 end;
316
317 t2: proc;
318 dcl x char5;
319 dcl ioa_ entry options variable;
320 dcl sysprint file;
321 x= "99";
322 x= before x ".";
323 put skip1 edit "'"x"'"a1a5a1;
324 put skip1;
325 end;
326
327 2174 phx15152
328 Code generator fault or out of bounds error when compiling the
329 following programs.
330 test: proc;
331 dcl sysprint file output;
332 dcl dbmp ptr;
333 dcl 1 dbm based dbmp aligned,
334 2 area area 255*1024-10;
335 dcl 1 FOO like dbm aligned int static;
336
337 put listFOO;
338 return;
339 end;
340
341 Proposed solution:
342
343 Update assign_storage when it is assigning storage for static
344 variables, add checking the size of the object segment as well as
345 checking it for automatic storage.
346
347 2173 phx16479
348 A usage message should be printed instead of a message containing octal
349 garbage when compiling "compile_messages" subroutine without an
350 argument.
351
352 Proposed solution:
353
354 The "compile_messages.pl1" is rewritten so that it accepts valid
355 pathname such as the pathname of the source segment or archive
356 segment. In addition, the message" suffix is added if the user does
357 not supply it. If incorrect number of argument is supplied when
358 invoking "compile_messages", a meaningful message should be printed.
359
360 2172 phx15586
361 Executing the following program will cause a storage condition at the
362 first time and a fatal process error at the second time.
363 test : proc;
364 dcl astring char 10000 init "abcde";
365 dcl do_sw bit 1 init "1"b;
366 dcl i fixed bin;
367 dcl substr builtin;
368
369 do i = 1 to 10000;
370 if do_sw then
371 astring = substr astring i || substr astring 1 i - 1;
372 else return;
373 end;
374 end;
375
376 It is because PL/1 does not properly clean up stack extension when the
377 statement that causes stack extension is an if_then_else statement
378 which is followed immediately by the end of a do_loop. This error may
379 be related to error 1795.
380
381 2171 phx17278
382 PL/1 compiler produces an incorrect source map entry if it lack of "s"
383 access to the source's or include file's containing directory. Access
384 to the containing directory is not necessary to get the pathname of a
385 segment nor its DTCM, as long as the users have "r" access to the
386 segment itself.
387
388 2170 phx18829
389 A packed_pointer_fault condition is signalled but with no indication of
390 why or of any errors detected in the source when compiling the program
391 >udd>TR>TR_tc1>datapath.pl1 .
392
393 2169 phx14771
394 Incorrect code is generated when compiling the following test case with
395 both "-optimize" and "-table" options.
396
397 test: proc;
398 dcl dummy fixed bin 9 unsigned unal;
399 dcl i nfound j fixed bin 36 unsigned unaligned;
400 dcl ioa_ entry optionsvariable;
401 dcl nused fixed bin 35;
402 i = 3;
403 nfound = 4;
404 j = 1;
405 nused = 5;
406 if i < nfound & j <= nused then call ioa_ "right";
407 else call ioa_ "wrong";
408 return;
409 end test;
410
411 Proposed solution:
412 1 Fix the code generator.
413 2 Leave things as they are now since using -ot and -tb is the only
414 way to debug problems that only occur when the program is optimized.
415 3 Warn users that the symbol table of the optimized program may be
416 incomplete.
417
418 4 Ignore the "-table" option and emit a warning message at the same
419 time.
420
421 For solution 3 and 4, the affected modules is v2pl1.pl1 and
422 documentation change is AG92 and pl1.info segment.
423
424
425 Add the following lines
426 -> If you give both "-table" and "-optimize" , the "-table" option
427 will be ignored since "-optimize" and "-table" are mutually
428 exclusive. before the line
429 -> NOTES ON SEARCH LIST
430
431 Due to popular demand, the fixes for solution 3 and 4 will be
432 installed. Refer to forum transaction.
433
434 2168 phx14706
435 If aggregate references and BYTE builtin references are found in any of
436 the STRING builtin arguments, PL1 error message 294 will be generated.
437
438 test: procedure ;
439 dcl bit_ar8 dimension 1 bit 8 unaligned init1"11111111"b;
440 dcl char_1 character 1 unaligned ;
441
442 char_1 = string byte binary bit_ar8 8;
443 end test;
444
445 Note:: "bit_ar8" is of type aggregate, therefore all other arguments
446 of the string will be converted to the aggregate type of "bit_ar8".
447 The problem may occur during the conversion of BYTE builtin to the
448 aggregate type.
449
450 2167 phx14977
451 After a PL/1 I/O "record" condition is raised, the length of the
452 target string is not being set which causes the undefined result of the
453 target string.
454
455 The following test case illustrates the problem:
456 test: procedure;
457 declare cdx_sysin file;
458 declare target char50 varying; /* target is of variable length */
459
460 on recordcdx_sysin begin;
461 put skip list" RECORD CONDITION RAISED> ";
462 end;
463
464 open file cdx_sysin title "record_stream_ user_input" env stringvalue record input;
465 put skip list" INPUT: ";
466 read filecdx_sysin intotarget;
467 put skip list " LENGTH " lengthtarget;
468 put skip list" OUTPUT "||target;
469 end test;
470
471 Note: If the input string is more than 50 characters, the target
472 string is undefined after the "record" condition is raised.
473
474 According to AM83 manual, PL/1 completes the I/O after the "record"
475 condition is signalled and will truncate the record to fit the target.
476 However, in our currect version of PL/1, the target string is undefined
477 because the length of the target string has not been set after the
478 "record" condition is raised; even though the input data has been
479 read into the target string by the "read" statement.
480
481 2166 phx20841 phx14595 phx15607
482 PL/1 fatal process error FPE occurs when the invalid program which
483 contains recursion in declarations is compiled the second time. PL/1
484 should give consistent error message for the subsequent compilations of
485 the same invalid program.
486
487 Test Case:
488 main_: proc;
489 dcl 1 a,
490 2 b char 3;
491 dcl 1 z like a based z;
492 dcl m char 3;
493 m = z.b;
494 end main_;
495
496 Compiling the test case the first time results in the pl1 error message
497
498 FATAL ERROR 365 ON LINE 6
499 Compiler error: storage condition while in the semantic translator.
500 Possible recursion in declarations. Correct all source programs and
501 recompile. If this message persists, contact the compiler maintenance
502 personnel.
503 SOURCE: m = z.b;
504 pl1: An unrecoverable error has occurred.
505 pl1: Translation failed. test.pl1
506
507 But compiling the test case the second time results in the FPE
508
509 Fatal error. Process has terminated. User stack space exhausted.
510 New process created.
511
512 Note: Ideally subsequent compilations should continue to get same
513 ERROR 365 instead of Fatal Process Error.
514
515 See TR20841 TR14595 and TR15607 for more information
516
517 2165 phx17376
518 PL/1 fatal error occurs when star_structure.incl.pl1 is defined twice.
519 Once in the main procedure and once in the internal procedure.
520
521 2164 phx17241
522 "Fatal error 335 while compiling a write from construct.
523 Out-of-bounds while in the semantic translator.
524
525 test case;
526
527 oacr: proc;
528
529 dcl sort_out file stream output;
530 dcl sel_exp char300 varying;
531
532 dcl 1 CSIR_raw_material aligned,
533 2 FILLER character 2 nonvarying unaligned;
534
535 open filesort_out;
536 sel_exp = copy""z"" length string CSIR_raw_material;
537
538 /* The first works, the second doesn't */
539 write filesort_out from sel_exp;
540 write filesort_out from copy""z"" length string CSIR_raw_material;
541
542 end oacr;"
543
544 Proposed solution:
545
546 Ensure that io_semantics is dealing with a symbol node at all times.
547
548 2162 phx15818
549 No error condition is raised for storing incorrect result in a fixed
550 bin 71 variable when a float bin value containing value larger than
551 2*10**21 2.0E+21 is assigned to a fixed bin 71 value.
552
553 The following test case illustrates the problem:
554 test_assign: proc ;
555 dcl long_float float bin 63,
556 long_fixed fixed bin 71;
557 dcl sysprint file print;
558
559 long_float = 2.0e+22;
560 long_fixed = fixed long_float 71 0;
561 put skip list long_float;
562 put skip list long_fixed;
563 end test_assign;
564
565 The output are as follows:
566 2.000000000000000000e+022
567 1250000000000000000000
568
569 Note that incorrect value is stored in long_fixed which is declared as
570 fixed bin 71.
571
572 2161 phx16265
573 Incorrect address of array is generated when compiling with -prefix
574 subscriptrange.
575
576 bug: proc;
577
578 dcl max_bytes current_byte fixed bin 24;
579 dcl code fixed bin 35;
580 dcl array_ptr bad_ptr ptr;
581 dcl array max_bytes char 1 unal based array_ptr;
582 dcl com_err_ entry options variable;
583 dcl get_temp_segment_ entry char * ptr fixed bin 35;
584 dcl ioa_ entry options variable;
585 dcl release_temp_segment_ entry char * ptr fixed bin 35;
586 dcl sys_info$max_seg_size fixed bin 35 external;
587 dcl cleanup condition;
588 dcl addr null builtin;
589
590 max_bytes = sys_info$max_seg_size * 4;
591 array_ptr = null ;
592
593 on cleanup call cleanup_proc;
594
595 call get_temp_segment_ "bug" array_ptr code;
596 if code ^= 0
597 then do;
598 call com_err_ code "bug";
599 return;
600 end;
601 else;
602
603 do current_byte = 1, 262140, 262141, 262142, 262143, 262144, 262145;
604 bad_ptr = addr array current_byte;
605 call ioa_ "Byte ^d address ^p." current_byte bad_ptr;
606 end;
607
608 call cleanup_proc;
609 return;
610
611 cleanup_proc: proc;
612
613 if array_ptr = null
614 then;
615 else call release_temp_segment_ "bug" array_ptr 0;
616 return;
617 end cleanup_proc;
618
619 end bug;
620
621 Note that Byte 262141 is incorrectly located at address
622 462|7777770 whereas Byte 262140 is correctly located at address
623 462|17777627.
624
625 2160 phx20392
626 Problem in evaluating a complex expression. The following test case
627 illustrates the problem.
628
629 round: proc num sig;
630
631 dcl num sig char*;
632 dcl number float dec59,
633 significant_digits fixed bin,
634 result float dec59;
635 dcl ioa_ entry optionsvariable;
636
637 number = convertnumber num;
638 significant_digits = convertsignificant_digits sig;
639 result = round number significant_digits;
640 call ioa_ "round^f^d = ^f" number significant_digits result;
641 return;
642
643 round: proc number significant_digits returns float dec59;
644
645 dcl number float dec59 parameter,
646 significant_digits fixed bin17 parameter;
647
648 dcl multiplier result float dec59;
649
650 dcl abs decimal float floor log10 sign trunc builtin;
651
652 multiplier = significant_digits;
653 multiplier = 10 ** multiplier-floorlog10absnumber-1;
654 result = decimalfloatsignnumber5959 *
655 floorabsnumber*multiplier+0.5/multiplier;
656 returnresult;
657 end round;
658
659 end round;
660
661 When invoked the above test program as:
662 round 123.14159 2
663 should produce
664 120.
665 Instead, it produces:
666 120.00000000000000001200000000000000000120000000000000000012
667
668 The affected module is any_to_any.pl1
669
670 2159 phx15532
671 The pl1 compiler gets FATAL ERROR 310 when trying to call the external
672 entry recursively. See the original TR and test case for more info.
673
674 2158 phx17612
675 Explicit initialization of an area is not performed. When an area is
676 declared with an initial value other than empty i.e. an area
677 variable, no error is detected in the compile time but the decalred
678 initial value is not assigned; the area is inititalized to empty. See
679 the original TR and test case for more info.
680
681 2157 phx14472
682 Wrong result is produced when comparing values of different precisions.
683 The following test case illustrates the problem:
684 main_: proc;
685 dcl a fixed bin 35 init 131072;
686 dcl b fixed bin init 4;
687 dcl ioa_ entry options variable;
688 if a <= b/2 then call ioa_ "^d <= ^d" a b/2;
689 end; Note: The compiler seem to apply the conversion rules
690 improperly.
691
692 2149 phx20802
693 The scale value in the symbol listing should match the declared value
694 which can be negative sometimes. Currently, it is always printed as a
695 positive value in the listing.
696
697 Test Case:
698 test: proc;
699 dcl x fixed bin 35-5;
700 dcl nt entry options variable;
701 call nt x;
702 call nt x;
703 end test;
704
705 Note: In the symbol listing, x is printed as fixed bin 355 instead
706 of fixed bin 35-5.
707
708 Proposed solution:
709
710 Update pl1_symbol_print.pl1 to get negative scale factors to print
711 correctly in the listing.
712
713 2155 phx16951
714 Adding 'varying' to a character declaration causes a fatal compiler
715 error.
716
717 test case:
718 t: proc;
719 dcl cs char 36 varying init "abc defg ";
720 dcl result char 10;
721 result = decat ltrimrtrimcs" " "101"b;
722 end t;
723
724 2154 phx17581
725 Compiler error 315 occurred when compiling the following test problem
726 when "-optimize" option.
727
728 print_val: proc lst_ptr;
729
730 dcl 1 cable aligned,
731 2 id character 5 unaligned,
732 2 cbl character 4 unaligned;
733 dcl lst_ptr ptr;
734 dcl cables_list 12 char 4 unaligned based lst_ptr;
735 dcl cable_title 12 char 66;
736 dcl i fixed bin;
737
738 cable = "";
739 do i = 1 to 3;
740 cable_title i = cable.cbl || "=" || rtrim cable.id;
741 cables_list i = cable.cbl;
742 end; end;
743
744 ERROR 315, SEVERITY 3 ON LINE 14 Compiler error: temporary node "cbl"
745 does not have value in storage.
746
747 SOURCE: cables_list i = cable.cbl;
748
749 See bug2097 for other problem when invoked with "-ot".
750
751 2153 phx15817
752 Error 435 occurred when compiling a multiple assignment. The
753 following test case illustrates the problem:
754
755 test: proc;
756 dcl x ptr external;
757 dcl y offset z external;
758 dcl nullo builtin;
759
760 x, y = nullo ; /* fails */
761 end;
762
763 ERROR 435, SEVERITY 3 ON LINE 7
764
765 Invalid conversion between pointer and offset variables because no area
766 has been declared to associate with the offset variable "cp.1".
767 SOURCE: x, y = nullo ;
768
769 See bug2070 for other problem when compiling a multiple assignment.
770
771 2152 phx13854
772 PL/1's "put list" does not always tab to the correct column eg.
773 column 1 11 21 etc. In some situations it will use space filling
774 method instead and cause one column to the left of the proper position.
775
776 The problem is best demontrated by printing a series of literals, of
777 length 8. The items are alternately separated by spaces and TABs.
778 Starting with the third item, every other one is wrong.
779
780 Test Case:
781 test_put: proc;
782 dcl
783 1 p,
784 3 p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 p12
785 char 8 init "I";
786
787 put skip list "p1" "p2" "p3" "p4" "p5" "p6" "p7" "p8" "p9" "p10" "p11" "p12";
788 put skip list p;
789 put skip list p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 p12;
790 end test_put;
791
792 The following output illustrates the problem: p1 p2 p3 p4 p5 p6 p7 p8
793 p9 p10 p11 p12 I I I I I I I I I I I I I I I I I I I I I I I I
794
795 Note: There are different algorithms for space filling and TAB using.
796 If within two spaces of a tab column, use space filling, otherwise use
797 a TAB. Mixing the two algorithms may cause the internal counter off by
798 one.
799
800 Proposed solution:
801 The affected module is put_field_.alm. See bug 2140 for
802 other problem caused by the put list statement.
803
804 2151 phx19010
805 The use of a builtin hbound that references parameter descriptors
806 within a PL/1 I/O statement results in a runtime error size
807 condition.
808
809 bounds_bug: proc; dcl array 10:10 fixed bin init 0;
810 call sub array;
811
812 sub: proc a; dcl a* fixed bin; dcl i fixed bin;
813 put skip list hbound array 1;
814 put skip list hbounda 1; end sub; end;
815
816 2150 phx18680 phx20151
817 PL/1 compiler generates bad code if it crosses a 16K boundary in the
818 stack frame while processing descriptors for a contiguous group of
819 arguments which share an identical descriptor.
820
821 Test case:
822 test: proc;
823
824 dcl padding 4072 fixed dec 12 2;
825 dcl a b c d e f fixed bin 35;
826 dcl nothing entry fixed bin 35 * fixed dec 12 2
827 fixed bin 35 fixed bin 35 fixed bin 35 fixed bin 35 fixed
828 bin 35;
829
830 call nothing a padding b c d e f;
831 return;
832 end;
833
834 The following code generated using the "-tb" and "-list" illustrate the
835 problem:
836
837 dcl padding 4073 fixed dec 12 2;
838 call nothing a padding b c d e f;
839
840 000013 aa 6 37744 3521 00 epp2 pr6|16356 a
841 000014 aa 6 37754 2521 00 spri2 pr6|16364
842 000015 aa 6 00100 3521 00 epp2 pr6|64 padding
843 000016 aa 6 37756 2521 00 spri2 pr6|16366
844
845 Note:
846
847 Bad code is generated setting up the descriptors for the call to nothing.
848 The requirements appear to be that a non-contiguous group of arguments
849 share a descriptor, and that somewhere in that group of descriptors the
850 40000 octal offset in the stack be crossed. The compiler generates code
851 to reference things like pr6 up 40002, which is taken by the hardware as
852 a negative offset from pr6 rather than as what the compiler intends.
853
854 2148 phx16114
855 Incorrect descriptors for * extent parameters are generated when
856 passing a cross_section of an array to a subroutine as an expression
857 by value.
858
859 Test Case:
860 1 test: proc;
861 2 dcl s1111 bit 1 unaligned;
862 3 s ** = "1"b;
863 4 call test_sub s *2 ;
864 5 return;
865 6 test_sub: proc x;
866 7 dcl x * bit 1 unaligned;
867 8 dcl i fixed binary;
868 9 dcl lbound builtin;
869 10 i = lbound x 1;
870 11 x i = "0"b;
871 12 return;
872 13 end test_sub;
873 14 end test;
874
875 Using "probe" on an active frame of "test_sub" at line 11, the
876 request "symbol x" reports "bit 1 unal parameter dimension
877 1358487760:1492492299". If the parenthesiss immediately surrounding
878 the actual parameter in line 4 are removed, the same request "symbol
879 x" now says "bit 1 unal parameter dimension 1:11", which is the
880 correct information.
881
882 2147 phx17503 phx14494
883 If both aggregate references and builtin references are found in the
884 pseudo_variable SUBSTR arguments, bogus error message will be
885 generated.
886
887 Test case:
888 test: proc;
889 dcl line char64var;
890 dcl ch_array 1 char50;
891 line = "random string";
892 substrch_array 1 lengthline = line;
893 end test;
894
895 Compiling the above test case produces error 121:
896
897 The number of arguments used in a reference to the builtin function
898 "length" is not equal to the number of arguments required by that
899 function.
900 SOURCE: substrch_array 1 lengthline = line;
901
902 Proposed solution:
903 If one of the arguments of the builtin is of array values
904 with unequal dimensionality or structures with different structuring,
905 display existing error 79 instead of 121.
906
907 The module that required to be modified is expression_semantics.pl1
908
909 2146 phx16157
910 description:
911
912 Runtime error: "Too few parameters in a format item" instead of
913 compile error is generated when the "get edit" statement is used with
914 the "a" format but with no length specified.
915
916 test: procedure;
917 dcl sysin file;
918 dcl foo char10;
919 get edit foo a;
920 return;
921 end test;
922
923 According to AM 83 manual, string format item section, the "a" format
924 with no length specific should not be allowed for input. The execution
925 of the above test case produces a runtime error message: "Too few
926 parameters in a format item." This message is not very specific to the
927 problem and the error should be catch at compiled time instead of run
928 time.
929
930 The affected modules are:
931 io_statement_parse.pl1
932 parse.incl.pl1
933 format_list_parse.pl1
934 pl1_error_messages_.message
935
936 2143 phx18065 phx18442
937 If the extent variables is used as the extent or dimension of any other
938 based area or variable for which there was no allocate statement, and
939 if the program is compiled with -ot -sb or options that causes
940 supression of area or array bound checking, that variable will not show
941 up in the list of external variables and will incorrectly listed as
942 declared but never referenced.
943
944 test_ref: proc my_area_ptr thing_ptr;
945 dcl my_area area sys_info$max_seg_size based my_area_ptr;
946 dcl my_area_ptr ptr parameter;
947 dcl sys_info$max_seg_size fixed bin35 ext static;
948 dcl thing char 4 based thing_ptr;
949 dcl thing_ptr ptr parameter;
950 dcl null builtin;
951
952 thing_ptr = null ;
953 allocate thing in my_area;
954 return;
955
956 end test_ref;
957
958 2140 phx20222
959 Using a put list statement to print out a data string after a
960 string causes an ASCII tab character to be printed between the blank
961 string and the data string. If that data string is more than 8
962 characters long, then PL1 I/O will cause an unwanted tab to be printed
963 after the data string.
964
965 Test case:
966 put_list_test: procedure ;
967 dcl sysprint file;
968
969 put list "" "12345" "12345" "RIGHT!!!";
970 put skip list "123456789" "123456789" "123456789" "RIGHT!!!";
971 put skip list "123456789" " " "123456789" "WRONG!!!";
972 put skip list "" "123456789" "123456789" "WRONG!!!";
973 put skip list " " "123456789" "123456789" "WRONG!!!";
974 put skip list " " "123456789" "123456789" "WRONG!!!";
975 put skip list " " "123456789" "123456789" "RIGHT!!!";
976 put skip list " " "123456789" "123456789" "WRONG!!!";
977 put skip;
978
979 end put_list_test;
980
981 Proposed solution:
982
983 The affected modules :
984 put_field_.alm - update the correct column for put list statement.
985 plio2_put_util_ - insert a comment for warning users about the
986 obsoletion of the modules.
987
988 See bug 2152 for other problem caused by the put list statement.
989
990 2139 phx20581
991 Assigning the aggregate structure to a scalar structure, PL1 fails to
992 diagnose the incorrect assignment but generates incorrect code that
993 uses one single register as all loop indexes of the assignment.
994
995 Test case:
996 test: proc;
997 dcl 01 src dim 8,
998 02 var1 dim 3 char 10 var;
999 dcl 01 dest like src;
1000 dcl i fixed bin;
1001
1002 do i = 1 to 8;
1003 srci.var1* = "";
1004 end;
1005
1006 dest = src;
1007
1008 end test;
1009
1010 Note: When the assignment statement "dest = src" is executed, PL1
1011 fails to diagnose the incorrect structure assignment. It
1012 instead generates incorrect code that uses the same register
1013 as the loop indexes for both the 1:3 loop and the 1:8 loop.
1014
1015 2137 phx20669
1016 The PL1 compiler does not validate references to variables unless the
1017 value is used.
1018
1019 If a PL1 program contains a declaration such as
1020 dcl based_array_len based array_ptr; and no declaration
1021 of based_array_len, the PL1 compiler will not generate any error
1022 message if the -no table control argument is specified and if the
1023 program has no reference to hbound based_array1 and dimension
1024 based_array1.
1025
1026 Test case:
1027
1028 t1: proc;
1029 dcl based_array based_array_len based array_ptr;
1030 dcl array_ptr pointer;
1031 end t1;
1032
1033 2136 phx20650
1034 PL1 compiler error messages 205 and 357 contain the value 262144 words
1035 as the maximum segment size. The correct value is 261120 words.
1036
1037
1038 Although most Multics software and user programs are not designed to
1039 cope with segments size greater than 255 pages 261120 words, the
1040 Multics hardware does allow segments to be as long as 256 pages
1041 262144 words. The PL/1 compiler generates correct code for variables
1042 as large as 256 Multics pages. Error messages 205 and 357 reflect this
1043 ability.
1044
1045 While most Multics segments are at most 255 pages long, some segments
1046 can be as long as 256 pages. A small number of PL1 application
1047 programs do use segments up to 256 pages long. Changing the value for
1048 the maximum segment size in the error messages to 261120 words will
1049 probably break those programs.
1050
1051 See >doc>info>256K_segments.gi.info for more information
1052
1053 2135 phx16916
1054 Pl1 does not generate correct long_profile code for some statements.
1055 In
1056
1057 call proc funct ... ;
1058
1059 the cost of calling "proc" will be charged to "funct"'s return
1060 statement.
1061
1062 Test Case:
1063 test: proc;
1064 dcl ioa_entry options variable;
1065 dcl n fixed bin;
1066
1067 n=66;
1068 call ioa_ "^d" n;
1069 n= funct;
1070 call ioa_ "^d" n;
1071 call ioa_ "^d" funct)^H;
1072
1073 funct: proc return fixed bin;
1074 dcl ix fixed bin;
1075
1076 d`^Ho i = 1 to 50;
1077 x = i;
1078 end;
1079 return^H;x;
1080 end funct;
1081
1082 end test;
1083
1084 Incorrecc^Ht long profile code is also generated for entrypoints in
1085 internal procedures. Currently there is a missing call to profile
1086 operator for any internal "procedure" statement or "entry" statement.
1087
1088 Test Case:
1089
1090 test2: proc;
1091
1092 call e1 66;
1093 call p1 66 66;
1094 return;
1095
1096 p1: proc x ypar;
1097 dcl x ypar fixed bin;
1098 dcl i^Hy y fixed bin;
1099
1100 y = ypar;
1101
1102 e1: entry x;
1103 do i = 1 to 50;
1104 y = i;
1105 end;
1106
1107 return;
1108 end p1;
1109
1110 end test2;
1111
1112 2134 phx20593
1113 When the name condition is signalled, the documentation
1114 AM83 page 13-15 AG91-03A page 7-57 claims that an error message is
1115 printed on the 'error output' stream and control is returned to the
1116 point at which the condition was detected. In fact, no error message
1117 is being printed.
1118
1119 2133 phx20359
1120 The compiler generates wrong code for the assignment to tempname in the
1121 following program.
1122
1123 test:proc;
1124 dcl area 512 bit36;
1125 dcl area_ptr ptr;
1126 dcl j fixed bin;
1127 dcl r fixed bin init2;
1128 dcl tempname char 8;
1129 dcl 1 temp1 based area_ptr unaligned,
1130 2 temp2 16 float bin;
1131 dcl 1 level1 0:9,
1132 2 level2 16 aligned,
1133 3 level3 char 8;
1134
1135 area_ptr = addr area;
1136 do j = 1 to 16;
1137 if temp1.temp2 j = 0e0 then do;
1138 tempname = level1 r.level2 j.level3;
1139 end;
1140 end;
1141 end test;
1142
1143 This appears to be fixed.
1144
1145 2132 phx20376
1146 Program yields different results when optimized. Eg:
1147
1148 stringrangesubscriptrange:test_pgm:proc;
1149 dcl i fixed bin 17;
1150 dcl A12 char1 unaligned init "A" "B" "C""D""E""F""G""H""I""J""K""L";
1151 dcl index 1:7 init 1 1 1 1 1 1 1;
1152 dcl ioa_ entry options variable;
1153
1154 do i = 1 to 3;
1155 call ioa_ "Case^d ^7^3d^ ^7 ^a ^" i index*
1156 A index1 Aindex2 Aindex3
1157 A index4 Aindex5 Aindex6 Aindex7;
1158 index 1 = index 1 + 1;
1159 index 2 = index 2 + 1;
1160 index 3 = index 3 + 1;
1161 index 4 = index 4 + 1;
1162 index 5 = index 5 + 1;
1163 index 6 = index 6 + 1;
1164 index 7 = index 7 + 1;
1165 end;
1166 end test_pgm;
1167
1168 2131 phx13918
1169 Compiler generates bad code for a mixed real and complex expression.
1170
1171 This appears to be fixed.
1172
1173 2130 phx13876
1174 Pl1 optimizer generates bad code.
1175
1176 bug:proc;
1177 dcl typej fixed bin init1;
1178 dcl defn bit36 varying static options constant init "777777777777"b3;
1179 dcl ioa_ entry options variable;
1180
1181 if substr defnj9 = "777"b3
1182 then call ioa_ "GOOD";
1183 else call ioa_ "BAD";
1184 unspec type = substr defnj9;
1185 end;
1186
1187 The optimized code generated for the if statement results in the else
1188 branch being taken unconditionally.
1189
1190 2129 phx13857
1191 The open/close statement does not reset environment stringvalue in
1192 the FSB.
1193
1194 2128 phx13700
1195 Under certain conditions, the stringsize condition is not signalled.
1196 Eg: dcl x char len based p; If len is 5 and x is set to a
1197 character string longer than 5 then stringsize is signalled. If len is
1198 -5 it is not. This sometimes results in a fatal process error.
1199
1200 2127 phx13248
1201 The pl1 compiler gets a fatal error 310 when trying to handle the
1202 passing of a cross section of an array that is part of an array
1203 structure. Eg:
1204 test_pl1:proclen;
1205 dcl len fixed bin;
1206 dcl x entry * char *;
1207 dcl 01 y 5,
1208 02 z 5 char len;
1209
1210 call x y.z 1*;
1211 end;
1212
1213 2126 phx12963
1214 Put_edit_eis destroys the value in index register 2. The compiler
1215 expects this register to contain the same value before and after the
1216 operator is invoked.
1217 See the test case at >udd>TR>TR_tc>tc2>jrs1.pl1 for more information.
1218
1219 2123 phx14508
1220 When the substr function has only two arguments and the second argument
1221 is an expression, incorrect string may be generated randomly. This is
1222 demonstrated by:
1223
1224 main: proc;
1225 dcl S20 char20 init "1234567890abcdefghij";
1226 dcl S11 char20 var;
1227 dcl j fixed bin init 2;
1228 dcl sysin sysprint file;
1229 S11 = substrS20 9 * j - 1 + 1;
1230 put skip list S11;
1231 end;
1232
1233 2119 phx16080
1234 If the object segment has a max length that is set too small for
1235 compilation, the compiler will emit error 311 which complains about the
1236 object segment exceeding the maximum supported length of 65536 words.
1237 This is not the case and the error message is misleading.
1238
1239 2121 phx19854
1240 The pl1_operators_ routine "call_signal_" is called whenever a pl1
1241 software condition is signalled. When invoked, this routine adds 48
1242 words to the stack frame of the signaller in order to save registers
1243 and such. It will then call pl1_signal_from_ops to handle the
1244 condition. Upon return from this call, the stack length is set to the
1245 value stored in sp|5 which is the offset of the original end of the
1246 permanent stack frame. This has the effect of removing all stack
1247 extensions - not just the 48 words added by "call_signal_". The
1248 following program demonstrates the problem:
1249
1250 size:
1251 test: proc;
1252 dcl a char len based p;
1253 dcl len fixed bin init 100;
1254 dcl x float bin init 1e30;
1255 dcl p pointer;
1256 dcl size condition;
1257
1258 allocate a;
1259 a = "a";
1260 on size;
1261 call internal_test a||"a" x;
1262 free a;
1263 return
1264
1265 internal_test: proc ai;
1266 dcl a char *;
1267 dcl i fixed bin;
1268 dcl ioa_ entry options variable;
1269 call ioa_ a;
1270 end;
1271 end;
1272
1273 In the above example, the call to internal_test contains an argument
1274 that creates a temporary stack extension and another that causes the
1275 size condition to be signalled. The condition handler for the size
1276 condition releases the storage of the first argument, causing it to be
1277 overwritten.
1278
1279 Proposed solution:
1280
1281 Remove the 48 words extension instead of all stack extension upon
1282 return from call_signal_ routine by subtracting the 48 words that added
1283 abd resetting the stack size.
1284
1285 The affected module is pl1_operators_.alm :
1286 Replace
1287 ldx0 sp|5 get offset of original end of frame
1288 By
1289 ldx0 sp|stack_frame.next_sp+1 reset the stack frame size
1290 sblx0 48,du by subtracting the 48 words we added.
1291
1292 2120 phx20356
1293 The runtime support routine any_to_any_ doesn't always handle fixed bin
1294 numbers with a negative scale factor correctly. The test case in the
1295 associated TR demonstrates this.
1296
1297 2116 phx19094 phx19318 phx19323 phx16341
1298 Compiler gets fatal error message 313 when the following program is
1299 compiled optimized:
1300
1301 compile_bug: proc returns ptr;
1302 dcl string char5;
1303 dcl string_ovrly char 1 varying based addrstring;
1304
1305 string_ovrly = string_ovrly;
1306 return addrstring;
1307 end;
1308
1309 This problem only occurs if "string_ovrly" is a varying string.
1310
1311 2115 phx19571
1312 The charno buitlin works incorrectly with unaligned pointers. It
1313 returns the entire packed pointer instead of just the character offset.
1314
1315 2113 phx19401
1316 If a nonlocal goto is used to leave a condition handler, there is an
1317 extra 48 words that is left on the stack frame of the procedure that
1318 signalled the condition. This can lead to a fatal process error in
1319 some instances:
1320
1321 test: proc;
1322 dcl cond condition;
1323
1324 on cond goto label;
1325 do while "1"b;
1326 signal cond;
1327 label: end;
1328
1329 end;
1330
1331 If the program given above is run, the stack frame of "test" will be
1332 extended by 48 words every time the "signal cond;" statement is
1333 executed. Stack space will quickly run out.
1334
1335 The problem is caused by the fact that the pl1_operators_ "signal"
1336 procedure extends the stack frame by 48 words before calling the
1337 routine "pl1_signal_from_ops_". Normally, the condition handler will
1338 eventually return control to this procedure which will reset the stack
1339 size. However, when a nonlocal goto is used to leave the handler,
1340 control is never returned to the pl1_operators_ "signal" procedure,
1341 and the stack frame isn't restored.
1342
1343 This is a hardcore problem.
1344
1345 Oct 23/85: The problem involves more than just the signaller.
1346 Example:
1347
1348 main_: proc;
1349 dcl x fixed bin;
1350 dcl p pointer;
1351 dcl len fixed bin init 1000;
1352 dcl string char len based p;
1353
1354 allocate string;
1355 do while "1"b;
1356 call fred string||"abc";
1357 x = x; /* the stack shorting code is on this line */
1358 loop: end;
1359 free string;
1360
1361 fred: proc a;
1362 dcl a char *;
1363 goto loop;
1364 end;
1365 end;
1366
1367 This program will run out of stack space if it is run. The "call
1368 fred" line contains an argument that must be stored as a temporary
1369 stack extension the || causes this. The nonlocal goto "fred" uses
1370 to return, does not clean up the stack extension. Therefore, each time
1371 "fred" is called, the stack frame of the caller gets larger - until
1372 the stack runs out of space.
1373
1374 The only way I can think of fixing this problem would be to make the
1375 routine "nonlocal_goto_.alm" used by the unwinder reset any stack
1376 extension it finds on the destination stack frame. It would have to
1377 first make sure that that stack frame wasn't owned by an ALM program.
1378
1379
1380 2105 phx16845
1381 generic functions Fails to find a match when calling a generic
1382 function. generic subroutines work fine.
1383
1384 2104 phx18757
1385 Incorrectly factors an entry declaration.
1386
1387 2103
1388 Use of -table on a program with a complicated expression in
1389 particular subscripted in the position attribute of a defined
1390 variable takes a reference count error.
1391
1392 2097 phx12211
1393 Multiple occurrances of the rtrim builtin in the source-list of a put
1394 statement with the list option cause ERROR 313 when compiled with -ot
1395 or -optimize. Example: 'put skip listrtrimenamertrimename'
1396 gets error 313.
1397
1398 See bug 2154 for other problem when invoked with "-ot".
1399
1400 2095 phx11977
1401 The 'unspec' builtin and pseudo-variable yield bad code when their
1402 arguments are based cross-sections of arrays that are members of
1403 structures with refer options.
1404
1405 An example:
1406
1407 unspec p -> struc.array* = unspec q -> struc.array*
1408
1409 totally fails to generate correct code for either the source or the
1410 target of the assignment.
1411
1412 2094 phx11810
1413 The 'size' condition is raised incorrectly in assignments where the lhs
1414 is fixed bin35 and the rhs is ceil of a fixed bin35.
1415
1416 dcl ceil builtin; dcl xy fixed bin35;
1417
1418 x=12; size:y=ceilx /* size is raised here */
1419
1420
1421
1422 2091 phx11800 phx12714
1423 The indicators are destroyed by ldlxn instructions in programs with
1424 stack frames larger than 16384 words when compiled with -optimize.
1425 Comparisons of based variables with unaligned based qualifiers then
1426 sometimes fail. Typically this happens in 'do while' loops. See the
1427 original TR and test case for more info.
1428
1429 2089 phx11459 phx11784
1430 References to character, decimal, or bit members of structures where the
1431 offset is greater than 2**18-1 characters, decimal digits, or bits may
1432 result in incorrect code addressing the structure. This only happens in
1433 assignments where the target and source both have extremely large
1434 offsets and lengths. There are 2 registers available for large offsets
1435 and lengths, the A and the Q. When more than 2 oversize offsets and
1436 lengths are present in an assignment the compiler stuffs one of them in
1437 an index register which throws away the high order digits of values
1438 larger than 2**18-1.
1439
1440 See the testcase for more info and suggestions for a fix.
1441
1442 Bit offsets of unaligned bit arrays which are larger than 2**18-1 also
1443 get put into index registers xrs when subscriptrange subrng is
1444 enabled. A separate test cases, test2089a, exists. This bug should not
1445 be considered fixed until both cases work.
1446
1447 2087 phx11434
1448 bug in pl1_snap_ causes the io switch user_output to be thrown out in
1449 the process of returning control to the user program. A quick fix is to
1450 change restore_io_'s call to iox_$attach_iocb to use an attach
1451 description of "syn_ user_i/o" around line 157. Currently, it is
1452 "syning" switches to themselves! A better fix, suggested by Bill York,
1453 is to have save_io_ create dummy uniquename switches, move the
1454 attachments of user_output, user_input, and error_output to these
1455 switches and reatch user_output, user_input, and error_output in the
1456 usual manner. Then restore_io_ would do its work by closing and
1457 detatching user_* and error_output and then moving the attachments of
1458 the unique-name switches back to their corresponding user_* and
1459 error_output switches.
1460
1461 See the TR for more info.
1462
1463 2083 phx11008 phx17956
1464 Bad code produced when using rank builtin, refer extents and prefixes
1465 such as subrg strg strz size.
1466 noload: proc;
1467 dcl 1 based_frob aligned based,
1468 2 data_len fixed bin 35,
1469 2 string char 0 refer based_frob.data_len
1470 unaligned;
1471 dcl 1 auto_frob aligned,
1472 2 len fixed bin 35 initial 8,
1473 2 string char 8 initial "abcdefgh" unaligned;
1474 dcl floatword float bin,
1475 from_ptr pointer,
1476 fixbin17 fixed bin,
1477 charvar6 char 6 var,
1478 ioa_ ext entry options variable;
1479 floatword = rank substr auto_frob.string 1 1;
1480 call ioa_ "^f" floatword;
1481
1482 from_ptr = addr auto_frob;
1483 floatword = rank substr from_ptr -> based_frob.string 1 1;
1484 call ioa_ "^f" floatword;
1485
1486 charvar6 = "abcdef";
1487 fixbin17 = rank substr charvar6 1 1;
1488 call ioa_ "^f" fixbin17;
1489
1490 end;
1491
1492 Note: When the above code is compiled with prefixes enabled, apparent
1493 corruption of registers or stack tempories causes the value stored in
1494 fixbin 17 to be 0 regardless of the content of charvar6 .
1495
1496 The implementaion of rank builtin assumes its argument will be in the
1497 high order byte of the A. In the case of strings whose length is given
1498 by an expression as opposed to a constant this will not be the case,
1499 resulting in incorrect code. TR11008 TR17956
1500
1501 2076 phx10128
1502 code generated for initial lists of the form
1503 'initialval1val2...**val' fails randomly for varying
1504 character string arrays and fixed or float decimal arrays.
1505 The initialization code depends upon the assumption that
1506 assigning undefined values is safe. This fails for varying
1507 string and decimal data types. Expand_initial.pl1 should be
1508 fixed not to do this. TR10128
1509
1510 2072 phx09985
1511 fred = decatfred"xyz""101"b faults in the semantic
1512 translator when fred is declared char varying. TR9985
1513
1514 2070 phx09528 phx14896 phx16971
1515 Compiler error 315 occured when compiling a multiple assignment. The
1516 following test case illustrates the problem:
1517
1518 stack_compute:proc;
1519 dcl stack_index fixed binary 18;
1520 dcl stack_base fixed binary 18;
1521 dcl stack 0:999 fixed bin 18 based object_base;
1522 dcl object_base pointer;
1523 dcl lbound builtin;
1524
1525 stack_index, stack_base = lbound stack1;
1526 end stack_compute;
1527
1528 ERROR 315, SEVERITY 3 ON LINE 8 Compiler error: temporary node "cp.1"
1529 does not have value in storage.
1530
1531 SOURCE: stack_index, stack_base = lbound stack1;
1532
1533 The compiler error is probably caused by an error in machine state
1534 management, in this case, the location of a temporary was inconsistent.
1535
1536 See bug2153 for other problem when compiling a multiple statement.
1537
1538 2069 phx09491
1539 ERROR 79 operands of an assignment operator have unequal
1540 dimensionality or structuring is gotten in an assignment statement of
1541 the form T=S,by name where T and S are based structures. When the
1542 based attribute is removed, the assignment statement is accepted.
1543 TR9491
1544
1545 THIS ERROR LIST ENTRY IS OBSOLETE. SEE NUMBER 2109 IN THIS ERROR LIST.
1546
1547 2067 phx09439
1548 compiler creates segments named "X.lis" where "X" is 28 chars
1549 long. TR9439
1550
1551 2066
1552 v2pl1 goes into an infinite loop calling pl1_symbol_print if
1553 it hasn't called the code generator and pl1_symbol_print
1554 faults. MPRF 6558 bug1851
1555
1556 2065
1557 pl1_symbol_print faults if it needs to print out a block name
1558 and the semantics hasn't processed the block the semantics
1559 could have faulted earlier ... It gets a token node in the
1560 first label of the first statement of the proc instead of a
1561 reference node. MPRF 6558
1562
1563 2063 phx09363
1564 code gen doesn't realize floating point instructions kill a
1565 common offset expression in q. Shows up with -ot. TR9363
1566
1567 2062 phx09361
1568 returnfn in a returnschar* proc where f is
1569 returnschar* fails when there is another entry to the
1570 proc which returnschar10var. TR9361
1571
1572 2061 phx09310
1573 returnbitcs in a returnsbit* proc where cs is char*
1574 parm fails. cs isn't converted to a bit-string. TR9310
1575
1576 2059
1577 ptrs declared by context aren't listed in the "NAMES DECLARED
1578 BY CONTEXT OR IMPLICATION" section.
1579
1580 2058 phx09228
1581 an index register value is sometimes destroyed and then
1582 saved. Bug in xr_man? See TR TR9228
1583
1584 2056 phx09125 phx10131
1585 the round_fx1 operator doesn't set the indicators to reflect
1586 what's in the q. TR9125 TR10131
1587
1588 2055 phx08869
1589 strg:put editrtrimsia where s is *char12 fails.
1590 Always puts s1 because strg code kills char offset in a.
1591 TR8869
1592
1593 2051 phx09045
1594 decatsrtrimc"101"b fails. Code to compute rtrimc is
1595 omitted. TR9045
1596
1597 2050 phx10077 phx10185 phx02606
1598 a=minbcor maxor unspec where a,b,c are fixed
1599 bin36 uns unal generates staq/cmpaq/ldaq instructions
1600 to odd addresses. MPRF 6397TR 10077TR 10185
1601
1602 2048 phx08902 phx14969 phx09881
1603 PL/1 should not use index register which is 18 bit to hold value that
1604 exceed the precision of fixed bin 17 . The following test case
1605 illustrate the problem:
1606
1607 test: proc;
1608 dcl Aarray 1000 fixed bin;
1609 dcl Barray 1000 fixed bin;
1610 dcl Aarray_index fixed bin 35;
1611 dcl Barray_index fixed bin 21;
1612
1613 Barray_index = 2**20;
1614 Aarray_index = Barray_index + 1;
1615 Aarray Aarray_index = 69;
1616 Barray Barray_index = Aarray Aarray_index;
1617
1618 end test;
1619
1620 Barray Barray_index = Aarray Aarray_index;
1621 000037 aa 6 00077 2361 17 ldq pr6|63,7 Aarray
1622 000040 aa 6 04021 7261 00 lxl6 pr6|2065 Barray_index
1623 000041 aa 6 02047 7561 16 stq pr6|1063,6 Barray
1624
1625 2047
1626 call ereversebitbinm22; where e is entrybit2
1627 and m is fixed bin gets ERROR 316 and then ERROR 313.
1628
1629 2046 phx08683
1630 substrstructure1lengthscalar gets ERROR 121 instead of
1631 promoting lengthscalar to a structure. TR8683
1632
1633 2044 phx08822
1634 tanget_$double_tanget_degrees_ fails on 90. It signals error
1635 because argument is too close to singularity, but when user
1636 types start according the deh message, it takes overflow
1637 muliplying max_value by the input. Code for determining sign
1638 of result in error case is wrong. TR8822
1639
1640 2043
1641 s.form=8 fails where form is fixed bin5 uns unal, the first
1642 two bits are in one word, the last three bits are in the next
1643 word. The q is not cleared. MPRF 6270
1644
1645 2042 phx09184 phx09839 phx12632 phx20389 phx15287
1646 If the argument used in rank builtin is a varying character string,
1647 internal compiler error occurs. The following test case illustrates
1648 the problem:
1649 test: proc;
1650 dcl ch1 char 1 var;
1651 dcl rank builtin;
1652 dcl val fixed bin;
1653
1654 ch1 = "1";
1655 ch1 = rank ch1 - rank "0";
1656 end;
1657
1658 ERROR 374, SEVERITY 3 ON LINE 7
1659 Compiler error: attempt to load decimal value "ch1" in a register.
1660 SOURCE: ch1 = rank ch1 - rank "0";
1661 pl1: An error of severity 3 has occurred.
1662
1663
1664 Note: ERROR 374 is not meaningful. Also the documentation of rank is
1665 unclear and ambiguous.
1666
1667 Proposed solution:
1668 1 builtin.pl1 - If the argument used in rank builtin is not a
1669 non_varying character string of length 1, display new error message
1670 instead of error 374 the compiler error .
1671 2 pl1_error_messages_.message - add a new error message.
1672 3 AG94 manual - The documentaion of rank should be defined
1673 better.
1674
1675 DOCUMENTATION CHANGES:
1676
1677 Manual Update for AG94C, Page 13-6.1
1678 REPLACE
1679 X must be a character string of length 1.
1680 WITH
1681 X must be declared as a non varying character string of length 1.
1682
1683 2040 phx08441
1684 out=translateintofrom fails on -no_optimize where in,
1685 out are declared charbc/9. The translate_3 operator
1686 leaves result in string_aq, then divide_fx1 is used to
1687 calculate length of result. Divide_fx1 destroys string_aq.
1688 Macro_table is correct. TR8441
1689
1690 2039 phx08518
1691 build_message_segment incorrectly checks for bad severities.
1692 Bad severities always get set to zero in pl1_error_messages_.
1693 These messages never get printed because 0 < -sv1. TR8518
1694
1695 2034 phx08211
1696 the compiler fails to match a generic alternative when the
1697 parameter and argument selector are dimensioned structures.
1698 TR8211
1699
1700 2032
1701 ptrpvarying_bs fails. It gets bad inline code.
1702
1703 2029 phx02362 phx11643
1704 compiler faults in semantics on subrg:p->a.c1=y; where
1705 a.c is a based struc with refer extents and y is like a.c.
1706 May be related to 1969. TR2362
1707
1708 2028 phx08093 phx08708
1709 a-b fails where a is fixed bin3535 and b is fixed
1710 bin3533. TR8093 Also fails where a is fixed bin352
1711 and b is fixed bin35. TR8708
1712
1713 2027
1714 references to s.meven_number.a fail where each element of
1715 s.m takes an odd number of words, s.m.a is fixed bin71 unal
1716 and s.m is preceded by an aligned ptr. Compiler generates
1717 staq/ldaq with odd addresses instead of sta-stq/lda-ldq
1718 pairs. MPRF 6080
1719
1720 2025
1721 the compiler faults on the return statement in a
1722 returnsarea* procedure.
1723
1724 2011
1725 if b="b" then ... fails where b is char1 unal auto and
1726 aliasable. Pad bits in b's word are not masked off when b is
1727 loaded into a. Also fails for aligned.
1728
1729 2008 phx07288
1730 p->s.descs*=q->s.descs* fails where s.descs and a
1731 preceding structure member are arrays with auto variable
1732 extent expressions. Offset of s.descs is computed
1733 incorrectly. TR7288
1734
1735 2006 phx07180
1736 hbounda1*1 is evaluated as hbounda**1 instead of
1737 hbounda**2. TR7180
1738
1739 2000 phx07142
1740 dcl entry entryentry returnsentry returnsentry
1741 variable; call entryentry; gets fault_tag_1 in function.
1742 call entryentry; gets no_write_permission in function.
1743 Both statements are valid. TR7142
1744
1745 1998 phx07077
1746 references to a1.b.c where c is char1 unal, starts on
1747 word boundary and following member of b is word aligned, are
1748 not padded correctly. Stores should clear padding but
1749 don't. Fails when a simpler structure is based on array
1750 element that assumes padding is clear. TR7077 May be
1751 related to 1757.
1752
1753 1994 phx20881
1754 PL/1 complains about the attributes of variables with ERROR 15 on a the
1755 seemingly valid declarations:
1756 dcl a fixed bin op_con1 static options constant init 1;
1757 dcl xx 3:op_con1 fixed bin op_con1;
1758 where
1759 op_con1 is declared as static optionsconstant init 15;
1760
1761 Since op_con1 can yield a scalar value that is suitable for conversion
1762 to a fixed_point, binary, real and integer, the compiler should allow
1763 the above declarations.
1764
1765 1993
1766 "s.l=c.u; if s.l=c.u then ..." fails with -ot where s.l is
1767 bit2 unal and doesn't start on a word boundary and c.u is
1768 bit2 unal int static optionsconstant and doesn't start on
1769 a word boundary. MPRF 5633 MPRF 5830
1770
1771 1992
1772 if a bound on an array is defined on a structure member, a
1773 garbage runtime symbol table entry is built. Either 1 an
1774 error message similar to ERROR 306 should be issued and a
1775 known quantity put in the runtime symbol table that will not
1776 cause stu_ to fault, or 2 if a correct runtime symbol table
1777 entry can be built, one should be. MPRF 5792
1778
1779 1987 phx06761
1780 boola"1"bvar where a has star-extents gets ERROR 329.
1781 TR6761
1782
1783 1983
1784 fixed dec5-6 variables are listed as fixed dec56 in the
1785 symbols section of the listing.
1786
1787 1982
1788 bad inline conversion code is generated to convert fixed
1789 dec55 to char. 9f-5 is incorrectly converted to 0.0000
1790 instead of 0.00009. The second mvne mop that is generated is
1791 an insm 1. This should be omitted.
1792
1793 1979
1794 if a varying int static array gets ERROR 292, and a
1795 subscripted array reference is used, the compiler goes into
1796 an infinite recursion loop.
1797
1798 1976
1799 passing an offset variable as an argument where the parameter
1800 is a ptr fails. The offset is converted to a pointer via the
1801 pointer operator, but the result is not saved.
1802
1803 1972 phx06423
1804 bad code for area=empty; where area extent is 2**15. After
1805 call to decimal_exp_, a bad mvn instruction is generated
1806 which tries to write in the object segment. TR6423
1807
1808 1969 phx06361
1809 compiler faults in expand_assign on subrg:a1=s; where a
1810 is a refer extent array of structures and s is a structure.
1811 May be related to 2029. TR6361
1812
1813 1967 phx06317
1814 unspecs.vs=... where s is a structure of varying char
1815 strings and vs isn't the first member of the structure gets
1816 bad code. TR6317
1817
1818 1966 phx06198 phx06967
1819 label_constant_1=label_constant_2 gets bad code. An eraq is
1820 done with contents of an instruction word instead of the
1821 address of the instruction. Also fails for entry constants.
1822 TR6198 TR6967
1823
1824 1965 phx06221
1825 sinpicture, asinpicture gets ERROR 136. TR6221
1826
1827 1958 phx05870
1828 on input, PL/I I/O does not default e5 format to e50,
1829 but to e5<decimal location of last e-format>. TR5870
1830
1831 1956
1832 "put data;" prints garbage for a variable declared in an
1833 outer block that hides the declaration of another variable.
1834
1835 1955
1836 if a variable is declared in a quick block with a complicated
1837 extent expression dependent upon a parameter to the quick
1838 block, and the quick block is called with a constant itp
1839 argument list, then the extent expression is calculated
1840 incorrectly when the thunk is called by probe or debug. The
1841 pointer registers that the itp argument list uses, namely
1842 pr6, are not the same when the thunk is invoked as when the
1843 quick block was called. Constant itp argument lists should
1844 not be used for blocks which generate thunks or for blocks
1845 whose sons generate thunks.
1846
1847 1954
1848 "put data;" fails if a variable is declared with a
1849 complicated extent expression dependent on a parameter, and
1850 the "put data;" is inside a nested non-quick block. PL/I I/O
1851 calculates an incorrect display pointer which it passes to
1852 stu_$decode_runtime_value which passes it to the thunk.
1853
1854 1953
1855 "put data;" fails in a program with based variables without
1856 implicit qualifiers. put_data_var_all_ cannot get the runtime
1857 address for a garbage symbol table offset. Also fails if the
1858 implicit qualifier is basedaddrw.
1859
1860 1949
1861 compiler gets ERROR 313 when it is forced to make an
1862 aggregate temporary whose length depends upon the length of a
1863 varying string. Works for nonvarying strings.
1864
1865 1940
1866 a variable s is never allocated if s is int static
1867 optionsconstant, only use of s is in basedaddrs and
1868 only use of overlaid string is in argument list.
1869
1870 1933 phx03816
1871 a calls b, b calls c, b compiled with -lpf, a, c weren't, c
1872 does a non-local goto back to a. The lpf data for the call
1873 statement in b will contain garbage. TR3816
1874
1875 1932 phx03815
1876 a calls b, b compiled with -lpf, a wasn't, b does a non-local
1877 goto back to a. The lpf data for the goto statement in b will
1878 contain garbage. Lpf code should figure out how much time is
1879 used by goto statement before it really transfers. TR3815
1880
1881 1930 phx03784
1882 under rare circumstances the same index register is sometimes
1883 used for two index values. The arrays are star extent arrays
1884 of structures. Fails w/o -ot. TR3784
1885
1886 1928 phx03798
1887 the sin builtin for single precision numbers gives notably
1888 less accurate results for arguments in the range 1/5681 to
1889 1/256. Currently sine_ uses sinx=x approx for 0 to 1/256.
1890 and a polynomial for 1/256 .3. Change it to use the
1891 polynomial for 1/5681 .3. See new_fortran bug 244.
1892 TR3798
1893
1894 1922 phx03454
1895 compiler gets size converting 5.6e2+5.6e2i to its internal
1896 representation. TR3454
1897
1898 1917 phx03228
1899 the offset in chars from the beginning of the source segment
1900 to a source statement is stored in a bit18 field in the
1901 symbol table statement map. This means that source segments
1902 >64K words long cannot be handled. TR3228
1903
1904 1912 phx03239
1905 bad code for returnunconnected_array where proc is
1906 returns5char*, returns*char7 or
1907 returns*char*. TR3239
1908
1909 1909 phx05357
1910 bad code for z=translatezconstantconstant where z is
1911 char3 aligned. Compiler fails to realize that the mvt to
1912 translate z kills the value of z in a register. See 1908.
1913 TR5357
1914
1915 1908 phx05357 phx07181
1916 bad code for z=translatezconstantconstant where z is
1917 char3 aligned. Z is zeroed before it is translated.
1918 TR5357 Also fails for char5 aligned. TR7181
1919
1920 1906 phx03077 phx08604 phx10024 phx11508
1921 for some assigments of one element of a refer extent array in
1922 a structure to another when subrg is enabled, compiler
1923 incorrectly generates code to check that lhs and rhs arrays
1924 have the same bounds eventhough only one element is being
1925 assigned. TR3077 TR8604 TR10024
1926
1927 1900 phx03032 phx08645
1928 compiler faults promoting scalar refer extent char string
1929 argument to an array. If argument is enclosed in parentheses,
1930 compiler doesn't fault but generates bad code. TR3032 Also
1931 fails promoting star extent scalar parameter char string
1932 argument to an array. TR8645 May be related to 1868.
1933
1934 1899 phx02993
1935 m_a references through null ptr on write froms where s is a
1936 defined structure. TR2993
1937
1938 1898
1939 when compiling a program with -tb that uses two arrays with
1940 different extent expressions that use the sum bif, compiler
1941 gets ERROR 313 and then faults in cg. Also fails if the two
1942 arrays have the same extent expression, but one is in an
1943 inner block.
1944
1945 1895 phx02761 phx19587 phx17702
1946 Semantic translator declare_descriptor$builder references through
1947 null ptr on invalid returns syntax:
1948
1949 returnscharlen. TR2761
1950 returnsfloat1:n TR19587
1951
1952 PL/1 should print an error message instead of a null pointer condition
1953 when a invalid return clause occurs as the above.
1954
1955 Proposed solution:
1956 declared_descriptor.pl1 - To avoid references through null pointer
1957 on invalid returns options, add checking for null pointer, if so
1958 display existing error 22 or 37.
1959
1960 1894 phx02530
1961 Bad code with -ot: compiler doesn't realize that setting a
1962 member of a structure sets unspecstructure. TR2530
1963
1964 1887
1965 A warning should be issued similar to ERROR 306 when a
1966 program is compiled with -tb and contains constructs that
1967 cannot be represented in the runtime symbol table, e.g.
1968 basedexp. An error message should be issued when put data
1969 will fail because of basedexp.
1970
1971 1886 phx15311
1972 "PL/1 gets confused about the bounds attributes of the defined
1973 overlay, and it insists on passing the array by value despite the fact
1974 that its bounds match the requirements of ""subroutine"". The
1975 following test case contains two examples of overlay defining, one
1976 using based addr and one using the defined attribute, the latter
1977 results in warning error 47.
1978
1979 test :
1980 procedure;
1981 dcl start count fixed bin;
1982 dcl array 20 fixed bin;
1983 dcl nothing entry options variable;
1984 dcl subroutine entry * fixed bin;
1985
1986 call nothing array start count;
1987 begin;
1988 dcl based_overlay count fixed bin based addr array start;
1989 dcl defined_overlay count fixed bin defined array start;
1990 call subroutine based_overlay; /* but this works */
1991 call subroutine defined_overlay; /* This fails */
1992 end;
1993 end test;
1994
1995 WARNING 47 ON LINE 13 ""array"" has been passed as an argument by
1996 value rather than by reference because its attributes did not match the
1997 parameter to which it was passed. SOURCE: call subroutine
1998 defined_overlay;
1999
2000 Note: The warning message 47 is not appropriate. It should indicate
2001 the name of the defined variable, not the name of the base reference."
2002 MPRF 5369
2003
2004 1885 phx04118 phx09324 phx17971
2005 PL/1 optimizer mishandles concatenation of 3 or more short character
2006 strings. A store to a temporary is omitted.
2007 bug : proc;
2008 dcl a char 1 init "a";
2009 dcl b char 1 init "b";
2010 dcl c char 1 init "c";
2011 dcl d char 1 init "d";
2012 dcl e char 1 init "e";
2013 dcl f char 1 init "f";
2014 dcl s1 s2 char 5 init "";
2015 dcl ioa_ entry options variable;
2016 s1 = a||b||c||d||e;
2017 s2 = a||b||c||d||f;
2018 call ioa_ "s1: ^a s2: ^a"s1 s2;
2019 return;
2020 end bug;
2021
2022 ! pl1 bug -ot
2023 PL/I 25
2024 bug
2025 s1: abcde s2: abc f
2026
2027 Note: When compiled with "-optimize" , the middle char "d" is dropped
2028 from s2, whereas compiled without optimization, correct result is
2029 printed.
2030
2031 1884 phx04044
2032 Varying internal static bit strings with init attribute are
2033 initialized to be one bit longer than they should be.
2034 TR4044
2035
2036 1882 phx03932 phx03989 phx06421
2037 Get data of char1 unaligned padded vars fails to clear
2038 padding at the end of the word. Also happens for conversions
2039 done by any_to_any_ where the target is unal and padded.
2040 Also fails for short bit strings. TR3932 TR3989 TR6421
2041
2042 1880 phx03252 phx03861 phx11871
2043 Bad code for stringstruc=... where the last member in struc is
2044 padded. The assignment does not clear the padding. Struc may be longer
2045 than 2 words. Fails for both char strings and bit strings. May be
2046 related to 1882, 1757. TR3252 TR3861
2047
2048 1879 phx04163 phx05173
2049 Bad code for fixed decpq ** fixed decr0. The scale
2050 factor seems to be ignored. The result is converted to fixed
2051 instead of being left as float. TR4163 TR5173
2052
2053 1875 phx04808
2054 Bad bif code for copyexpexp. Possible reusing of
2055 temporary. TR4808
2056
2057 1871 phx04529
2058 Call_op references through null ptr if internal entry
2059 constant is declared by dcl stmt, but no such internal
2060 procedure exists. TR4529
2061
2062 1870 phx04626
2063 Runtime signals error condition because of a bad type field
2064 in descriptor of output item on put dataformat_variable.
2065 TR4626
2066
2067 1868 phx04562
2068 The compiler faults in base_man while compiling a statement
2069 in which a scalar argument is promoted to an array in an
2070 argument list. The scalar char32 was initialized to more
2071 than one value. TR4562 May be related to 1900.
2072
2073 1867 phx04507
2074 Using multiple assignment statements to store the same
2075 variable in more than 11 other variables fails. Bug in store.
2076 TR4507
2077
2078 1864 phx19469
2079 If two variables are declared fixed bin int static optionsconstant
2080 with the same initial value, and the initial value>1, one is placed in
2081 "NAMES DECLARED BY DECLARE STATEMENT" section of listing, and the
2082 other is placed in "NAMES DECLARED BY DECLARE STATEMENT AND NEVER
2083 REFERENCED" section. The -table control argument must be specified.
2084
2085 Oct 3 1985: Actually this problem occurs for non fixed bin constants
2086 too. See associated TR.
2087
2088 1863
2089 If an internal procedure with a returns attribute is invoked
2090 in an argument list with a returnschar* function, the
2091 internal procedure is not made non_quick eventhough it will
2092 be invoked during a stack extension.
2093
2094 1854
2095 when pl1 is changed to use 32K constant offsets, the listing
2096 generator will have to have the bug fixed that prevents
2097 listing them properly. see new_fortran listing generator
2098 compare_object has to be fixed too.
2099
2100 1850 phx02643
2101 dcl 1 struc based, 2 x ptr unaligned, 2 y0:n ptr unaligned,
2102 2 z-1:n+1 ptr unaligned; gets FATAL ERROR 310 when compiled
2103 with -table and n is internal static. This appears to be a
2104 general problem with unaligned pointer arrays with expression
2105 extents. TR2643
2106
2107 1849 phx02768
2108 arg1,arg2,...,argn are passed to entry_valued_function in
2109 reverse order when entry_valued_function returnsentry in
2110 statements where the returned value is invoked and the
2111 argument list for the returned enty is omitted. Example: call
2112 entry_valued_functionarg1...argn; fails. Bypass by
2113 specifying omitted null argument list: call
2114 entry_valued_functionarg1...argn; succeeds. TR2768
2115
2116 1840 phx02956
2117 reference to a level 1 defined structure in the from option
2118 of a write statement causes FATAL ERROR 310. TR2956
2119
2120 1839 phx02956
2121 assign statement involving pictures peceded by a reference to
2122 the convert builtin conversion of picture to character data
2123 sometimes causes the compiler to fault. TR2963
2124
2125 1838
2126 when an external entry is declared by context or implication
2127 the first reference to the entry does not appear in the cross
2128 reference listing.
2129
2130 1835
2131 bad runtime symbol table entry built for offset variable
2132 whose area reference has a non-constant offset expression.
2133 This causes trouble with get data, put data, probe, and
2134 debug.
2135
2136 1824
2137 The compiler fails to diagnose the specification of more than
2138 one precision for a parameter in an entry declaration.
2139
2140 1819
2141 call subrlabarray; where labarray is a label array
2142 constant, gets FATAL ERROR 335.
2143
2144 1818
2145 References to members of structures declared with the like
2146 attribute are somtimes omitted from the cross reference
2147 listing. When compiled with the -table control argument the
2148 structures are also omitted from the runtime symbol table.
2149
2150 1815 phx02375
2151 <struc1>, <struc2> = <options_constant_struc>; gets errors
2152 200 and 498 about bad declaration. Bug in expand_assign.
2153
2154 1798
2155 a bad while clause in a do statement can cause FATAL ERROR
2156 334.
2157
2158 1795 phx06934 phx08146 phx10569 phx02501 phx12672 phx17741
2159 the stack may not be shortened after evaluation of the expression in an
2160 if statement. TR6934 TR8146 TR10569 TR2501 TR12672 TR17741. It
2161 may be related to Error 2172).
2162
2163 1794
2164 substrstri1 gets ERROR 313 and bad code.
2165
2166 1787
2167 close_file command won't close or detach files attached
2168 explicitly by the user using io attach etc. This is
2169 probably reasonable, but it should print an error...it is a
2170 little mysterious to say 'cf foo' and have nothing happen!
2171
2172 1778
2173 the error condition should be signalled when a variable with
2174 a value of zero is raised to the zero power. The error
2175 condition isn't signalled when the exponent is a constant.
2176
2177 1770 phx19673
2178 Bad offset is found in PL/1 error message regarding a size condition.
2179 The offset is set to zero which is not corresponded to the line where
2180 the error occured. Also probe seem to get very confused about the
2181 values of arguments to the subroutine.
2182
2183 Test case:
2184 test: proc;
2185 dcl sysprint file;
2186 dcl str char 8 init "string";
2187 dcl value array_size controlled;
2188 dcl array_size fixed bin init 8;
2189 allocate value;
2190 value * = 100.0;
2191 call sub ;
2192 free value;
2193 return;
2194
2195 sub: proc ;
2196 put edit str value skipa8p"z9";
2197 return;
2198 end sub;
2199 end test;
2200
2201 PL/I 28e
2202 Error: size condition by >udd>TR>Gilcrease>work>test$p|0
2203 Precision of target insufficient for number of integral digits assigned to \c
2204 it.
2205 system handler for error returns to command level
2206
2207 Note: if "value * = 100.0" is changed to "value * = 50.0" then the
2208 output string will be 5050505050505050 .
2209
2210 1757 phx01691
2211 assignment to a packed word-aligned aggregate of less than 2
2212 words in length may fail to take into account any padding
2213 used to pad out the last member of the aggregate to a word
2214 boundary. TR1691 May be related to 1998.
2215
2216 1741
2217 if a locate statement gets the storage condition, an attempt
2218 to close the same file gets out_of_bounds.
2219
2220 1739 phx07140
2221 diagnose refer extents that refer to variables after the
2222 array instead of before it. Compiler gets storage
2223 conditions, incorrect ERROR 70's or fatal process errors if
2224 not diagnosed. TR7140
2225
2226 1737
2227 dcl i fixed bin external constant; should get error message
2228 complaining that only files and entries may be external
2229 constants. Instead FATAL ERROR 310 often occurs.
2230
2231 1736
2232 dcl a4 fixed;dcl b2 defa*; call foob; where foo
2233 expects an array of 2 gets WARNING 47. Either compiler &
2234 documentation should disallow the declaration because array
2235 sizes don't match for simple defining, or the WARNING should
2236 be removed and the array should be passed by reference.
2237
2238 1726
2239 if the expression to the left of a refer option contains an
2240 irreducible function reference, the value of the expression
2241 used to determine the size of the based structure may not be
2242 the same as the value used to initialize the variable named
2243 in the refer option.
2244
2245 1722
2246 put data fails if there is a data list, the data list
2247 contains a string with refer extents or a structure
2248 containing such a string, and an explicit qualifier which
2249 is different than the implicit qualifier if any is used.
2250
2251 1702 phx12788
2252 passing an isub-defined array to an optionsvariable entry
2253 gets error 248.
2254
2255 1688
2256 float bin to fixed bin conversion operators do not signal
2257 size if absinput >= 2**71. any_to_any_ works OK.
2258
2259 1678
2260 if a default stmt is used in a program with a picture
2261 format, an erroneous WARNING 206 results.
2262
2263 1672
2264 The base binary or decimal of real constants passed to
2265 optionsvariable entries varies depending on whether the
2266 program contains any default statements or not. Further, the
2267 action when no default statements are present is wrong!
2268 A constant like 0 is incorrectly passed as binary if no
2269 default statements are present, and correctly passed as
2270 decimal if any default statements are present. System entries
2271 like com_err_ but not ioa_ expect binary values only.
2272 Programs that use both default statements and
2273 optionsvariable should include a default statement of the
2274 form: default constant & real binary; in order to get
2275 constants converted to binary. An alternate solution is to
2276 write the constant in binary 0b instead of decimal 0.
2277 This problem will be fixed in phases; the first phase will be
2278 to just diagnose the present incorrect action, the second
2279 phase will be to change the implementation.
2280
2281 1670
2282 dcl xsizey fixed; produces ERROR 295 if y is based
2283 on automatic ptr even though the ptr isn't used to get
2284 the size.
2285
2286 1669 phx14496
2287 passing a part of an array containing characters as argument gets FATAL
2288 ERROR 335 or ERROR 343.
2289 test:procedurestr;
2290 dcl str** char*;
2291 call innerstr1*;
2292 return;
2293 inner:procedurestr1;
2294 dcl str1* char*;
2295 str11="a";
2296 return;
2297 end inner;
2298 end test;
2299
2300 FATAL ERROR 335 ON LINE 3
2301 Compiler error: null_pointer condition while in the semantic translator.
2302 Correct all source program errors and recompile. If this message
2303 persists, contact the compiler maintenance personnel.
2304 SOURCE: call innerstr1*;
2305
2306 1665
2307 the copy file does not contain the correct output if some get
2308 statements to a file use the copy option and some do not.
2309 Problem is that the entire input buffer is copied, instead of
2310 just the input characters scanned.
2311
2312 1532
2313 The size condition is not raised in some circunmstances although the
2314 PL/1 standard says it should be: 1 when a negative floating point
2315 number that exceeds the field width by one character is output by a
2316 "put edit" statement. 2 when an e_format is given with only a field
2317 width, i.e. "put edit ...ew;" that the field width is insufficient
2318 to prevent loss of low order digits. Because of performance
2319 implications, there are no plans to correct this behavior at this time.
2320 time."
2321
2322 1408 phx05595
2323 a non-local goto into a stack frame which has been extended
2324 by signalling the conversion condition or by a string expr
2325 in an arglist does not shorten the frame, possibly leading
2326 to stack overflow isn 8689. Possible fix: if a statement
2327 has a label that is referenced non-locally or that is
2328 assigned to a label variable, then always shorten_stack
2329 before that statement. TR5595
2330
2331 1401
2332 extent expressions for members of nonparameter
2333 structures with no explicit storage class may be
2334 handled incorrectly.
2335
2336 1309
2337 get data, put data, debug, and probe fail for any based
2338 variable whose implicit qualifier is other than a simple
2339 reference to a scalar pointer or offset variable c53184.
2340 There is presently no room in the runtime_symbol node to
2341 encode a more complicated qualifier expression.
2342
2343 1186 phx03594 phx05101 phx13134 phx16426 phx19743 phx15634
2344 THIS IS THE PADDED REFERENCE BUG. dcl c char<8 auto|static unal;dcl
2345 cb char<8 unal basedaddrc; references to cb are not padded while
2346 references to c are. This is part of a more general problem which has
2347 always existed and cannot be fixed without recompiling every program at
2348 every Multics site. In general, if a short based or external string
2349 which normally can be padded to a word boundary with zeroes is set in a
2350 program that also passes it as argument, the padding does not take
2351 place, causing problems if another program, which does not pass it as
2352 arg, references the string with the assumption that the padding has
2353 been done. Padding is normally done if a short string is aligned or is
2354 not followed by an unaligned var in a structure.
2355
2356 Inconsistent result is generated when referencing a PL/1 character
2357 variable of less than a word.
2358
2359 Test Case:
2360
2361 test: proc;
2362 dcl source string char 2;
2363 dcl bstring char 2 based;
2364 dcl addr builtin;
2365 dcl ioa_ entry options variable;
2366 addr source -> bstring = "10";
2367 if string ^= "10" then call ioa_ "bad news.";
2368 end;
2369
2370 Note: The above test case is not guranteed always fail, but it
2371 generally do so because of the existing padding reference problem.
2372
2373 1006
2374 into, from options and string, unspec builtins fail for a
2375 connected array reference whose declaration inherits some
2376 dimensions from a containing structure. This is a rare case.
2377 Example: dcl 1 st3, 2 a fixed bin; write froma;
2378 Note that st has no other members. Also, the compiler
2379 doesn't check that the above options or builtins have
2380 connected references.