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 401
    • Issues 401
    • 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
  • #2039
Closed
Open
Created Sep 17, 2012 by Robert Bernecky@rbeDeveloper

CF IVEXPprf_mod.sac unit test fails due to ssarelat shortcoming

Bugzilla Link 1024
Created on Sep 17, 2012 15:28
Resolution FIXED
Resolved on Oct 05, 2012 19:56
Version svn
OS Linux
Architecture PC

Extended Description

This problem appears to have been around for many moons, 
but I just stumbled on it over the weekend. The _gt_SxS_() 
could be removed by CF, because:
 five > (AVIS_MAX(res) - 1);
and 
 AVIS_MAX( res) = five;
so we should get:
 
  five > (five - 1);
FALSE
The saarelat code is wrong here.
int[*] id(int[*] y)
{ return(y);
}
int main()
{
 five = _max_SxS_( id(5), 0); /* mod wants args >= 0 for this */
 two = _max_SxS_( id( 2), 0);
 res = _mod_SxS_( two, five); /* res member 0...4 */
 z = _gt_SxS_( five, res);  /* AVIS_MAX(res) = five! */
 StdIO::print( z); 
 return(0);
}
sac@rattler:~/sac/testsuite/optimizations/constantfolding$ sac2c crud.sac -doawlf -nowlf -nocyc -bopt:uglf -noctz -v1 >crud
sac2c -V
sac2c v1.00-beta (Haggis And Apple)
 developer rev 18221:MODIFIED linux-gnu_x86_64
 (Sun Sep 16 17:08:12 EDT 2012 by sac)
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking