weird issue in WRCI
When compiling
module ArrayTransform;
use ArrayBasics: { sel};
export all;
inline
int[n,d:shp] reverse(int[n,d:shp] A)
{
return { [i] -> A[_sub_SxS_(_sub_SxS_(n, 1), i)] | [i] < [n] };
}
inline
bool[d:shp_t] transpose(bool[d:shp] A)
| _all_V_(_eq_VxV_(reverse(shp), shp_t))
{
shp_t = reverse(shp);
return { iv -> _sel_VxA_(reverse(iv), A) | iv < shp_t };
}
with sac2c-d -noprelude -maxoptcyc 0 ArrayTransform.sac -v4 -#d,WRCI, I get:
...
MatchingRCs: WRCI: looking for matching RC -> _pinl_70__flat_18
WRCIgenarray: WRCI: Genarray RCs:
WRCIwith: WRCI: Looking for A[iv] only use...
WRCIwith: WRCI: candidates after conventional reuse:
WRCIwith: WRCI: Looking for more complex reuse candidates...
Internal compiler error
Assertion "(NTYPE_CON (array) == TC_aks) || (NTYPE_CON (array) == TC_akv) || (NTYPE_CON (array) == TC_akd)" failed at /Volumes/Users/sbs/sac2c/src/libsac2c/typecheck/new_types.c:883 -- TYgetDim applied to other than AKV, AKS or AKD type!
Please file a bug at: https://gitlab.sac-home.org/sac-group/sac2c/-/issues