multi-operator WL fails on multi-threaded execution
When compiling the following code:
int scan (int[256,8] a) {
row = with {} : genarray([8], 0);
a2, m = with {
([0] <= iv < [256]) : (row, 42);
} : (genarray([256], row), genarray([256], 0));
//StdIO::print (m);
return _sel_VxA_ ([255], m);
}
int main (){
test_array = with {} : genarray([256,8], 1);
sum = scan(test_array);
return sum;
}
the vector m::int[256] should be a vector with 256 values 42.
In the sequential version this is the case! However, when compiling with -tmt_pth,
only the elements computed by the first thread are 42, the others are arbitrary.
This can be made visible when uncommenting the print.
This error appears consistently on sac2c 2.1.0-PuurGeluk-279-ge586b2 even when using -noprelude.