weird Type upgrade problem
When I compile
inline
int[10,10] myrotate (int[2] counts, int[10,10] A)
{
for( i=0; _lt_SxS_(i,2); i=_add_SxS_(i,1) ) {
count = _sel_VxA_([i],counts);
slice_shp = _modarray_AxVxS_([10,10], [i], count);
A = with {
( [0,0] <= iv < slice_shp ) : _sel_VxA_( _add_VxV_(_sub_VxV_([10,10],slice_shp),iv) , A);
} : modarray( A );
}
return(A);
}
int main()
{
x = with {} : genarray([10, 10], 0);
a = with {
([0,0]<= iv <[4,4]) : myrotate ( iv, x);
} : genarray( [4,4], x);
return _sel_VxA_([0,0,1,2], a);
}
using
sac2c 1.3.3-MijasCosta-1032-gff7ec
build-type: RELEASE
built-by: "sbs" at 2023-01-16T20:34:58
(can be experiences using -noprelude) then I get
Internal compiler error
Assertion "cviv[i] < cvshp[i]" failed at /Volumes/Users/sbs/sac2c/src/libsac2c/constants/constants_struc_ops.c:1275 -- Index error: iv[1] >= shp[1]
Please file a bug at: https://gitlab.sac-home.org/sac-group/sac2c/-/issues