dimitriv / Ziria

A domain-specific-language and compiler for low-level bitstream processing.
92 stars 18 forks source link

Incorrect variable naming #117

Closed bradunov closed 8 years ago

bradunov commented 8 years ago

The following program:

fun comp test_addRARToSubframe() {
var cellGrid : arr[1] complex16;
  let aFrame = {0};
  for f in [0, length(aFrame)]{
    emits cellGrid;
  }
};
let comp main = read[int] >>> test_addRARToSubframe() >>> write

when compiled with

EXTRAOPTS='--no-static-eval' make test.out

fails with:

..\test.c(35): error C2374: '__val_arr16' : redefinition; multiple initialization [C:\Users\bozidar\Documents\Code\SDR\Ziria\compiler\csrc\CompilerVS\CompilerVS13.vcxproj]
          ..\test.c(28) : see declaration of '__val_arr16'

because the same name is used for two variables