Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • sac2c sac2c
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 402
    • Issues 402
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 13
    • Merge requests 13
  • Deployments
    • Deployments
    • Releases
  • Wiki
    • Wiki
  • External wiki
    • External wiki
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • sac-group
  • sac2csac2c
  • Issues
  • #2229
Closed
Open
Created Jul 17, 2018 by Grzegorz Goral@gg3Developer

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
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking