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 403
    • Issues 403
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 12
    • Merge requests 12
  • Deployments
    • Deployments
    • Releases
  • Wiki
    • Wiki
  • External wiki
    • External wiki
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • sac-group
  • sac2csac2c
  • Issues
  • #1902
Closed
Open
Created Dec 28, 2013 by Robert Bernecky@rbeDeveloper

sac2c doesn't like fold early on...

Bugzilla Link 1106
Created on Dec 28, 2013 22:59
Resolution FIXED
Resolved on Jan 10, 2014 19:14
Version svn
OS Linux
Architecture PC

Extended Description

sac2c -V
sac2c v1.00-beta (Haggis And Apple)
 developer rev 18415 linux-gnu_x86_64
 (Fri Dec 27 16:07:39 EST 2013 by sac)
sac@rattler:~/sac/testsuite/optimizations/awlf$ sac2c crud.sac
warning: AWLF is enabled: -ecc enabled.
warning: AWLF is enabled: -extrema enabled.
warning: AWLF is enabled: -maxoptcyc=20
   
**  1: Loading SAC program ...
  **** Locating source code ...
  Reading from file "./crud.sac" ...
  **** Running C preprocessor ...
  **** Parsing input file ...
   
**  2: Preprocessing SAC program ...
  **** Hiding struct definitions behind typedefs and accessors ...
  **** Handling zero-generator with-loops ...
  **** Handling multi-generator with-loops ...
TRAVERSE ERROR: node of type 95:N_spid found where 72:N_spfold was expected!
------------------------------------------
cat crud.sac
int main ()
{ 
  pwl = with {
        ( [ 0, 20] <= iv=[j,k] < [ 20, 40 ] ) : 42; 
        ( [ 15, 0] <= iv=[j,k] < [ 20, 20 ] ) : 666; 
        ( [ 0, 0 ] <= iv=[j,k] < [ 15, 20 ] ) : k; 
  } : fold( plus, 0);
  StdIO::print( pwl);
  return(0);
}
inline
int plus( int x, int y)
{
  z = _add_SxS_( x, y);
  return( z);
}
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking