jasmin icon indicating copy to clipboard operation
jasmin copied to clipboard

Unused stack variable “may not be initialized”

Open vbgl opened this issue 1 year ago • 1 comments

Compilation of the program below fails with:

variable allocation: variable “s.159” (declared at "bug_680.jazz", line 3 (12-13)) may not be initialized

export
fn adc_stack(reg u64 x) {
  stack u64 s;
  s = 0;
  _, s += x;
}

vbgl avatar Jan 11 '24 13:01 vbgl

I encountered the same bug. Here is another example

export fn main () -> reg u64 {
  reg u64 x;
  stack u64 y;

  x = 0;
  y = #MOV(x);
  return x;
}

eponier avatar Feb 07 '24 15:02 eponier