Skip to content

Five gen-verilog features have live emitter code and failing tests: seven guards that never ran #2386

Description

@gHashTag

What

Seven tests across five files fail on master on both macOS and the Linux runner. Each
file has exactly one commit — the one that added the test alongside the feature it
tests
— and none has been touched since:

file added commit subject (truncated)
verilog_r_si_1.rs 2026-05-22 wave-27: t27c gen-verilog emits __mul_noop(a, b) helper
verilog_initial_decl.rs 2026-05-23 wave-29: t27c gen-verilog hoist bench integer counters
verilog_translate_off.rs 2026-05-23 wave-30: t27c gen-verilog emit standalone synthesis …
verilog_array_literal_expr.rs 2026-05-23 wave-31: t27c gen-verilog ExprArrayLiteral in expression …
verilog_array_param_index.rs 2026-08-05 fix(gen-verilog): array-param element index -> part-select

The failing tests:

verilog_array_literal_expr.rs  r_ca_2_synthetic_no_comment_only_call_argument
verilog_array_param_index.rs   array_param_index_is_element_part_select
verilog_initial_decl.rs        r_vd_1_synthetic_no_integer_decl_inside_initial
verilog_initial_decl.rs        r_vd_1_real_uart_spec_no_integer_decl_inside_initial
verilog_r_si_1.rs              r_si_1_emitter_injects_mul_noop_helper
verilog_translate_off.rs       r_tr_1_synthetic_no_inline_translate_marker
verilog_translate_off.rs       r_tr_1_real_uart_spec_no_inline_translate_marker

Messages:

R-SI-1 helper missing: `__mul_noop` function declaration not found.
Expected exactly 2 module-scope `_bench_<name>_cycles` counters … got [].
array-param index did not lower to a 64-bit part-select
Error: Compile error: parse error in fn 'driver' near line 8:
       unexpected token after expression statement: KwReturn

The emitter code is still there

This is the part that makes it a defect rather than a cleanup. Checked on origin/master:

  • __mul_noop9 hits in bootstrap/src/compiler.rs, including the emission itself at
    :11842: function [63:0] __mul_noop; // t27#1886: 64-bit, u64 products no longer truncate
  • _bench_ — 6 hits · translate_off — 4 hits · part-select — 9 hits

So the features were not removed. The emitter still knows how to emit them and no longer
reaches that path for these inputs.
That is a conditional regression, not a deletion, and
it will not show up in a diff of the feature's own code.

r_ca_2 is different in kind and possibly the most interesting: it fails at parse, not
emission — unexpected token after expression statement: KwReturn. Its fixture no longer
parses at all.

Why nobody noticed

cargo test -p t27c --tests stops after the first failing target; these are targets 43–73
of 73, so they never ran. That is #2382. The ratchet landed in #2383 now runs all 73 and has
these seven baselined, so they will not regress further unnoticed — but baselining is not
fixing, and this issue is the fixing.

What is NOT established

  • Whether these ever passed. Each was added in the same commit as an implementation whose
    message claims the feature works, which makes "passed, then regressed" the likely reading —
    but I did not check out those commits and run them, so I am not asserting it.
    Born-failing and regressed need different responses, and the distinction is one bisect away
    for anyone who wants it.
  • Whether the seven share one cause. Five files, two shapes (missing emission vs parse
    failure). They may be one regression or five.
  • Nothing here is attributed to any particular commit. In particular this is not a claim
    about fix(compiler): dead-store elimination deleted every write to module state (Closes #2363) #2380, which touched the optimiser today — the baseline that surfaced these was taken
    after it, so it cannot distinguish.

Separately: four tests are baselined that CI passes

spec_first_layer2_packs_two_neuron_trits, spec_first_mlp2_…, spec_first_mlp3_… and
spec_first_neuron_n_accumulates_and_quantizes fail on macOS and pass on the Linux
runner
. They are in the baseline, which means a genuine Linux regression in any of them
would be invisible to the ratchet. Being pruned separately.

Related: #2382, #2383, #2384.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions