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 395
    • Issues 395
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 24
    • Merge requests 24
  • Deployments
    • Deployments
    • Releases
  • Wiki
    • Wiki
  • External wiki
    • External wiki
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • sac-group
  • sac2csac2c
  • Issues
  • #2308
Closed
Open
Created Mar 01, 2022 by Robert Bernecky@rbeDeveloper

empty error message triggered by wrong conformity check when using -ecc

**** Optimization cycle pass: 3
   
  ****** Optimizing regular function:
  ******  _MAIN::main( hidden, hidden, hidden): ...
           Applying common subexpression elimination ...
           Determine candidate functions for inlining ...
           Inferring loop invariant variables ...
           Applying type upgrade ...
           Eliminating Type Variables ...
           Eliminating Bottom Types ...

compilation failed while Running SAC optimizations.
apex@medusa:/tmp/crud$ sac2c_d UTCompress.sac  -ecc -v4 

cat UTCompress.sac 
use Array: all;
use ArrayFormat: all;
use StdIO : all;

inline int[+] slBII(bool x, int[+] y)
{ // Boolean scalar compress non-scalar
  sy = shape(y);
  zs = sy;
  zs[dim(y)-1] = toi(x) * zs[dim(y)-1];
  z = take(zs, y);
  z = (true == x) ?  y  : genarray(drop([-1],sy)++[0],0);
  return(z);
}

// inline int UTCompress_testXXI()
int main()
{ 
 TEN=genarray([2, 3, 4],66);
 A_141=genarray([2, 3, 0],false);
 A_142=slBII(false, TEN);
 show(A_142);
 return(0);
}

apex@medusa:/tmp/crud$ sac2c -V
sac2c 1.3.3-MijasCosta-782-g8e7b0
build-type: RELEASE
built-by: "sac" at 2022-03-01T09:11:54

Edited Mar 01, 2022 by Sven-Bodo Scholz
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking