Compiler assertion while compiling relaxation.sac from the tutorial files
I was going through the tutorial using the PDF for reading, and the GitHub files for compiling. The relaxation.sac file from the SacBase/Tutorial L2 folder:
use Array: all;
use Math: all;
use StdIO: all;
int main()
{
weights = [ [0d, 1d, 0d], [1d, 4d, 1d], [ 0d, 1d, 0d]];
vect = [1d, 2d, 3d, 4d];
mat = [ vect, vect+4d, vect+8d, vect+12d];
print( mat);
mat = { [i,j] -> sum( { iv -> weights[iv] * rotate( 1-iv, mat)}[[...,i,j]] ) }
/ sum( weights);
print( mat);
return(0);
}
This is the command used and error received from compiling the file.
$ sac2c relaxation.sac
Internal compiler error
Assertion "cviv[i] < cvshp[i]" failed at /home/build/sac2c/src/libsac2c/constants/constants_struc_ops.c:1266 -- Index error: iv[1] >= shp[1]
Please file a bug at: http://bugs.sac-home.org
My version of sac2c:
sac2c -V
sac2c 1.3.2-MijasCosta-18-gce04c
build-type: RELEASE
built-by: "build" at 2018-07-10T14:38:07