-d treecheck breaks in scyc
I suspect almost any compile will break here. It may be trival to fix, but I would like to know what scyc is intended to do, and why it runs here. uglf was executed earlier, so functions are no longer "grouped".
scyc : Type stabilization cycle
tup : Applying type upgrade (fun based)
etv : Eliminating Type Variables (fun based)
ebt : Eliminating Bottom Types (fun based)
cf : Applying constant folding (fun based)
vp : Propagating variables (fun based)
dfc : Applying function call dispatch (fun based)
lof : Lifting optimization flags
**** Type stabilization cycle pass: 1
****** Optimizing regular function:
****** sacprelude_d::sel( int[.], ulonglong[*]): ...
Applying type upgrade ...
-> Running syntax tree checks
Internal compiler error
Assertion "NODE_TYPE( arg_node)== N_module || global.local_funs_grouped" failed at /home/sac/sac2c/build_d/src/libsac2c/check.c:47 -- If run fun-based, special funs must be grouped.
Please file a bug at: https://gitlab.sac-home.org/sac-group/sac2c/-/issues
apex@medusa:~/apexgit/Ancillary/benchmks/UnitTests/UTIndexSet/crud$ sac2c fundef.sac -d treecheck -chkfreq 4 -v4
sac2c -V
sac2c 1.3.3-MijasCosta-1068-g43af
build-type: DEBUG
built-by: "sac" at 2023-05-11T18:37:11
// fundef.sac
bool[*] id( bool[*] y)
{ return(y);
}
int main()
{
cond = [true,true];
c = _sel_VxA_([0],cond);
if (c) {
z = 42;
} else {
z = 666;
}
z = _sub_SxS_(42,z);
return(z);
}