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
emit-C: the compiler's own C is four errors from compiling — a global's proxy local zeroed as global = 0 (arrays), and a str field reset through a const receiver after a borrowing concat #1043
After #1038's fix on the C4 branch (header follows the runtime, with_* prototypes from the With declarations, &"lit" temporaries), emit-c-test compiles the compiler's C (corpus in-unit, 70 MB) down to four cc errors, two classes:
escapes is pcre2's pub let escapes: [75]i16 (defs/pcre2_compile). The MIR local _16 is a global proxy (MirLower.ensure_global_local, new_local(..., is_global=1)); the C backend names the proxy by the global's C name (place_text) and emits a zero store at its StorageLive. For an array global that is invalid C; for a scalar global it would zero the global at function entry — worth checking whether the LLVM path skips the store or whether this is a live C-backend bug.
read-only variable is not assignable ×2 (8 sites in total in Codegen.gen_src_intrinsic and siblings):
self.source_text ++ "" through &self: the concat borrows its parts (with_str_concat_n, not _move_first), yet the backend resets the FIELD as if it had been moved (its copied-string aliasing bookkeeping), through the const receiver pointer. Either the reset is wrong (the field was borrowed) or the receiver must not be const — the LLVM backend's behavior for the same MIR decides which.
Both are C-backend defects independent of the corpus; the corpus's own C compiles alone (0 errors). Repro: with build :emit-c-test on wo-c4 (worktree ~/.local/with-staging/c4r), log out/command/emit-c-test.
Triage 2026-10-25, with v0.15.3.0 (main a261b65): closing as a duplicate of #955. The compiler's C no longer reaches cc: emission stops first at a tuple map key (emit-c has no hash and equality functions for a map key of type (i32, i32)). #955 now tracks the whole lane; the two classes here (a global array proxy zeroed with global = 0, and a str field reset through a const receiver) are carried there.
Activity
fix(mir): consume lowered binding operands only once
stdlib sourcing Phase 1: the c-algorithms corpus, its upstream tests,…
C algorithms phase1 (#1142)
ehartford commentedon Oct 25, 2026
Triage 2026-10-25,
with v0.15.3.0(main a261b65): closing as a duplicate of #955. The compiler's C no longer reachescc: emission stops first at a tuple map key (emit-c has no hash and equality functions for a map key of type (i32, i32)). #955 now tracks the whole lane; the two classes here (a global array proxy zeroed withglobal = 0, and a str field reset through a const receiver) are carried there.