WLF multi-operator bug
The following program:
int main()
{
ax,ay = with {
( [0, 0] <= [i,j] < [2,10]) : (2, 2.0);
} : ( genarray( [10,10] ,1),
genarray( [10,10], 1.0 ));
ax,ay = with {
( [0, 0] <= [i,j] < [2,10]) : (_sel_VxA_([i,j], ax), _sel_VxA_([i,j], ay));
} : ( genarray( [10,10] ,1),
genarray( [10,10], 1.0 ));
return _sel_VxA_( [2,2], ax) ;
}
when compiled with
sac2c 1.3.3-MijasCosta-682-gd1a1
replaces the second selection wrongly, which subsequently leads to the following error:
error: line 9 in file ./reg.sac:
error: Element types of one generator body expression and another generator body expression should be identical; types found:
error: double{1.0...} and int{2}
compilation failed while Running SAC optimizations.