rpg_source_decl_emit.zig: a FILL at the tail of a chunked structure initial value completes the value (lane Lgd2) #773

Manually merged
binjovi-bot merged 1 commit from lgd2 into trunk 2026-11-09 22:57:18 +00:00
Owner

Cause (public twin lr1-af-i10-200-blank)

dcl-ds d; a int(10) dim(200) inz(1); c1 char(10) inz(*blank); end-ds; is initialized by the
compiler as CHARACTER[400], CHARACTER[400] and FILL[10] = X'40' at offsets 0, 400 and 800.
rpg_source_decl_emit.initial assembled only bytes chunks ("the chunks of one long initial value"),
so the FILL at the tail left the value unknown and the structure was refused: "no declaration of
symbol 253: the initial value is not proved" (failUndeclared s01), and all three statements that
name it failed. This is a public instance of "statement names a field whose declaration failed".
The zoned twin lr1-af-z50-200-blank has no FILL tail and was clean.

Rule

A fill store of width w that follows the chunks contiguously counts as w bytes of that value.
Test: src/rpg_lgd_test.zig (red before: SOURCERER-FAIL; green: the subfield A_00253_F0 int(10) dim(200) inz(1) and A_00253_G800 char(10), the three statements emitted).

Debug sweep over all 562 stripped saves of src/testdata: only lr1-af-i10-200-blank changes.

Battery lgd2/long-start

31 cases for the coordinator to capture (requests/lgd2/long-start): non-invariant and hexadecimal
start values of 50/90/150 bytes, start values beyond twelve lines, a whole mixed structure, arrays of
distinct start values, varchar and based. Not captured by the lane.

## Cause (public twin lr1-af-i10-200-blank) `dcl-ds d; a int(10) dim(200) inz(1); c1 char(10) inz(*blank); end-ds;` is initialized by the compiler as `CHARACTER[400]`, `CHARACTER[400]` and `FILL[10] = X'40'` at offsets 0, 400 and 800. `rpg_source_decl_emit.initial` assembled only `bytes` chunks ("the chunks of one long initial value"), so the FILL at the tail left the value unknown and the structure was refused: "no declaration of symbol 253: the initial value is not proved" (`failUndeclared s01`), and all three statements that name it failed. This is a public instance of "statement names a field whose declaration failed". The zoned twin lr1-af-z50-200-blank has no FILL tail and was clean. ## Rule A `fill` store of width w that follows the chunks contiguously counts as w bytes of that value. Test: `src/rpg_lgd_test.zig` (red before: SOURCERER-FAIL; green: the subfield `A_00253_F0 int(10) dim(200) inz(1)` and `A_00253_G800 char(10)`, the three statements emitted). Debug sweep over all 562 stripped saves of `src/testdata`: only lr1-af-i10-200-blank changes. ## Battery lgd2/long-start 31 cases for the coordinator to capture (`requests/lgd2/long-start`): non-invariant and hexadecimal start values of 50/90/150 bytes, start values beyond twelve lines, a whole mixed structure, arrays of distinct start values, varchar and based. Not captured by the lane.
binjovi-bot manually merged commit 116886ba98 into trunk 2026-11-09 22:57:18 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
sean/sourcerer!773
No description provided.