• Keine Ergebnisse gefunden

DECLARE STRUCT2 STRUCT2-STRUCTURE(3) INITIAL(12#1);

Im Dokument HAL/S-FC USER’S MANUAL (Seite 109-112)

DECLARE I INTEGER INITIAL(4);

Type 2 Options Standard Form

5: DECLARE STRUCT2 STRUCT2-STRUCTURE(3) INITIAL(12#1);

6: V1= STR2_V$ (I1;);

7: I1 = STR2_I$(I1;);

8: CLOSE DR57989;

The code getting the BI504 error has the following characteristics:

Error BI504 indicates an internal compiler failure, not a source code error. Some source code work arounds for this problem are: use different variable subscripts for the two structure references, move the integer or scalar assignment before the vector or matrix assignment, or try separating the two structure references to see if the intervening statements will prevent the error condition (DR 57989, 6/13/88).

8. BS122 Compilation Error on UPDATE PRIORITY Statement

The compiler emits the severity 2 error BS122 (“Indirect Stack Usage Conflict”) during Phase 2 of a compilation for an UPDATE PRIORITY statement that does not contain a label. This error indicates an internal compiler failure. The error is not emitted if the UPDATE PRIORITY statement contains a label. For example, the statement below gets error BS122:

UPDATE PRIORITY TO 10;

whereas the following statement compiles successfully:

UPDATE PRIORITY PROCESS_NAME TO l0;

(DR 51017, 6/23/88).

1. The same variable subscript is used for both structure references (stmts 6 and 7 in code segment).

2. Both structure references are on the right-hand side of the expression.

3. The first structure reference is a vector or matrix terminal and the second structure reference is an integer or scalar terminal.

4. The two structure references may or may not have statements between them (certain intervening expressions, such as an integer assignment other than the structure terminal, will prevent the error condition).

HAL/S-FC User’s Manual USA003090 32.0/17.0

8-28 November 2005

9. Limited Range of Input Values Valid for FLOOR Function

The range of input values to the single precision FLOOR function is limited to -32768 < x

< 32767.996. Values outside this range will give erroneous results (DR102944, 10/19/88).

10. ZO3 Compilation Error - Loop Invariant Messages

An extraneous ZO3 warning message may sometimes appear when the optimizer pulls some loop invariant HALMAT from an IF-THEN block to outside of a loop. The compiler uses HALMAT to generate AP-101 code. The warning message was added under DR 103032 for possible GPC errors due to the loop invariant code being executed when the IF conditions were false. The ZO3 message could appear even when the loop invariant HALMAT which is moved does not change the subsequent AP-101 code. For this case, a GPC error is not possible. Note also that multiple ZO3 warning messages may be obtained for one line of HAL/S source code since the ZO3 message is due to changes in HALMAT, not changes in AP-101 code (DR105051, 3/92 & 3/93).

11. Underflow/Overflow Restrictions

The range of ‘safe’ double precision numbers that can be used with a comparison in HAL/S has been determined to be:

H ‘F1FFFFFFFFFFFFFF’ (-1.004336 E+59) to H ‘8D10000000000001’ (-2.430865E-63)

and

H ‘0D10000000000001’ (1.004336 E+59) to H ‘71FFFFFFFFFFFFFF’ (2.430865E-63)

If either or both of the numbers being compared are in the specified range then no underflow or overflow is possible. If both are outside of the ‘safe’ range then the potential for overflow or underflow exists.

Floating point exponent overflow and underflow are caused by the SED instruction in the case of a comparison operation using SCALAR DOUBLE values. The compiler will generate a LED (Load Double) followed by a SED (Subtract Double) instruction (DR103772, 9/93).

12. BI002 SEVERITY 3 Space Management System Error

A BI002 severity 3 error message is emitted at the end of the compilation listing when compiling a HAL/S source program which generates any of the following valid error messages:

BI501: SEVERITY 2, ?? BITS UNACCOUNTED FOR BS102: SEVERITY 3, SUBPROGRAM STACK OVERFLOW BS120: SEVERITY 3, DATA STORAGE CAPACITY EXCEEDED BX100: SEVERITY 2, ?? NOT ADDRESSABLE

BX200: SEVERITY 2, SYT_SCOPE>MAX_SCOPE#

PE100 (only PASS compilers): SEVERITY 2, ILLEGAL NONHAL FUNCTION TYPE

PR6 (only BFS compilers): SEVERITY 2, THE NAME ?? DOES NOT SATISFY HAL/S NAME UNIQUENESS CRITERIA FOR TASKS; NAMES OF ALL TASKS AND PROGRAMS MUST BE UNIQUE TO SEVEN CHARACTERS

The BI002 error message states “BI002 SEVERITY 3 BUG IN SPACE MANAGEMENT SYSTEM ->->IN RECORD_FREE, NOT ALLOCATED: ..”. The BI002 error message is emitted when the records that are being freed have never been allocated. The records do not get allocated because a valid error message is emitted (a severity 3 error

message causes a branch to the end of the compilation). Therefore, the code to allocate the records is never executed and the BI002 error message is emitted (DR108642, 9/93).

13. Unexpected BS117 Error

When a TEMPORARY variable is declared within a DO statement, the compiler attempts to store and subsequently access this data on the stack. Since the first eighteen

halfwords of the stack are reserved, the first available entry for storage of TEMPORARY variables is at the nineteenth halfword. For a construct which exhibits arrayness,

including multi-copy structures, the compiler attempts to generate a stack location for its zeroth element (i.e., it subtracts the length of one element from the starting location on the stack). When the available stack location minus the length of the zeroth element is less than zero, the compiler emits a BS117 severity 2 error, as there can be no negative stack addressability. The only construct which can have a zeroth element of length greater than the lowest starting address on the stack (nineteen), is a multi-copy structure with a template length of more than eighteen halfwords (the zeroth element of a copy structure is a single copy of the structure). Therefore, when a TEMPORARY multi-copy structure of single-multi-copy length greater than eighteen is declared such that the next available stack location minus the zeroth element length is less than zero, a BS117 error is emitted. This same structure, however, would not receive an error and would produce correct object code if there were enough stack entries assigned prior to it such that the zeroth element would not reside at a negative stack address. Also, the stack available for TEMPORARY variable storage is refreshed upon reaching the end of the DO loop, so the problem can manifest itself over and over again with each subsequent DO statement.

To avoid the BS117 error, the user can either (1) make sure no TEMPORARY multi-copy structures which have a template length greater than eighteen halfwords are used or (2) utilize dummy declarations of TEMPORARY variables just prior to the problem declare such that enough “pad” is established to avoid the BS117 error (DR106639, 9/93).

14. Exceeded Bounds Assignments

The compiler can allow an assignment to exceed the bounds of the receiving data.

There are two methods of doing this that could cause problems, and thus should be avoided:

a) A %COPY statement with a variable halfword count field larger than the size of the destination when the destination is local data (this may also go beyond the bounds of a CSECT). The compiler performs bound checking when a literal count is provided but cannot perform these checks when a variable count is used. Local data can be rearranged whenever a

compilation unit is modified.

b) Overindexing an arrayed variable (subscript is greater than the receiving data’s declared arrayness).

HAL/S-FC User’s Manual USA003090 32.0/17.0

8-30 November 2005

The compiler assumes that arrayed assignments and %COPY are not used in this manner and does not update registers that may have been modified as a result of a violation of these rules (DR109030, 03/95).

15. “Referenced but not Assigned” Error (BI105) Is Not Produced (DR103765, 2/15/95) It is not always possible to determine at compile time if a variable has been initialized before being referenced. Each situation described below is accompanied by a related code fragment.

Variables that are referenced after being assigned will not produce an error message since branching makes execution order of code very difficult for the compiler to determine.

DECLARE SCALAR, S1, S2;

S1 = S2;

S2 = 3;

NAME variables pointing to uninitialized NAME variables within templates will not

produce error messages as it is impossible to determine what a NAME variable will point to at compile time.

STRUCTURE S2:

1 N1 NAME SCALAR,

Im Dokument HAL/S-FC USER’S MANUAL (Seite 109-112)