empty error message triggered by wrong conformity check when using -ecc
**** Optimization cycle pass: 3
****** Optimizing regular function:
****** _MAIN::main( hidden, hidden, hidden): ...
Applying common subexpression elimination ...
Determine candidate functions for inlining ...
Inferring loop invariant variables ...
Applying type upgrade ...
Eliminating Type Variables ...
Eliminating Bottom Types ...
compilation failed while Running SAC optimizations.
apex@medusa:/tmp/crud$ sac2c_d UTCompress.sac -ecc -v4
cat UTCompress.sac
use Array: all;
use ArrayFormat: all;
use StdIO : all;
inline int[+] slBII(bool x, int[+] y)
{ // Boolean scalar compress non-scalar
sy = shape(y);
zs = sy;
zs[dim(y)-1] = toi(x) * zs[dim(y)-1];
z = take(zs, y);
z = (true == x) ? y : genarray(drop([-1],sy)++[0],0);
return(z);
}
// inline int UTCompress_testXXI()
int main()
{
TEN=genarray([2, 3, 4],66);
A_141=genarray([2, 3, 0],false);
A_142=slBII(false, TEN);
show(A_142);
return(0);
}
apex@medusa:/tmp/crud$ sac2c -V
sac2c 1.3.3-MijasCosta-782-g8e7b0
build-type: RELEASE
built-by: "sac" at 2022-03-01T09:11:54
Edited by Sven-Bodo Scholz