Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • sac2c sac2c
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 418
    • Issues 418
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 15
    • Merge requests 15
  • Deployments
    • Deployments
    • Releases
  • Wiki
    • Wiki
  • External wiki
    • External wiki
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • sac-group
  • sac2csac2c
  • Issues
  • #2559
Closed
Open
Issue created Mar 25, 2026 by Sven-Bodo Scholz@sbsOwner

SSA transform bug!

Try this:

int foo (int i)
{
   a = with {
           ([0] <= [i] < [1]) :3;
       }: genarray([1], 0);
   b = with {
        ([0] <= [j] < [1]) :i;
       }: genarray([1], 0);
   return _sel_VxA_ ([0], b);
}

int main ()
{
   return foo( 42);
}

when using sac2c 2.1.0-PuurGeluk-229-g32fe4 with -noprelude I get:

**  9: Preparing for code optimization ...
./crazy.sac:7:29: abort:
  6.    b = with {
  7.         ([0] <= [j] < [1]) :i;
                                 ↑
  8.        }: genarray([1], 0);
  9.    return _sel_VxA_ ([0], b);

  Cannot infer type for i__SSA0_2 as it may be used without a previous definition.
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking