You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
t27c gen-c: local nested array declared as [16]u8 m[16] #7441
t27c gen-c emits a local nested-array declaration with the wrong C shape, whatever the initializer is.
fn f() void {
var m: [16][16]u8 = ...;
}
comes out as
[16]u8 m[16] = ...;
which is not C. A global of the same type is lowered correctly; only function locals are affected.
Hit by the seven 16x16 locals in specs/depin/prove.t27.
Found by the gen-c defects lane while fixing #7353 (nested repeat initializers). Part of #5980 (the self-hosted core must match gen-c byte for byte, so it refuses local nested arrays until this is fixed).
Boundary
specs/depin/prove.t27
User Scenarios
Given a t27 function containing a local variable declared as var m: [16][16]u8 = ...;, When t27c gen-c compiles the function, Then the emitted C declaration must have the correct nested array shape uint8_t m[16][16] (or equivalent) and not the malformed [16]u8 m[16].
Requirements
FR-001: The C code generator MUST emit correct C array declarators for local nested array variables, mapping the t27 type [N][M]T to the C declarator T name[N][M].
FR-002: The fix MUST NOT change the already-correct lowering of global nested array declarations.
FR-003: The compiler MUST continue to pass all existing gen-c test cases.
Success Criteria
t27c gen-c specs/depin/prove.t27 exits with exit 0 and the generated C file contains seven correct 16×16 local array declarations (e.g., uint8_t m[16][16];).
The self-hosted core build (blocked by this defect) compiles without errors related to local nested arrays.
Reopened 2026-10-07: the bulk close of issues without a ## Boundary section was reverted by the owner. Nothing to do here; this comment replaces the earlier close notice.
Activity
fix(gen-c): a local nested array is declared as a C matrix (Closes #7441
seal: reseal depin/prove and vsa/similarity_search for the #7441 loca…
gHashTag commentedon Oct 7, 2026
Reopened 2026-10-07: the bulk close of issues without a
## Boundarysection was reverted by the owner. Nothing to do here; this comment replaces the earlier close notice.Merge genc-local-nested-array into origin/master (from master's side,…
Merge master 20d20c9 into genc-local-nested-array; refreeze FROZEN_HA…
Merge genc-local-nested-array into master eda79f0 (from master's side)