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 26
    • Merge requests 26
  • Deployments
    • Deployments
    • Releases
  • Wiki
    • Wiki
  • External wiki
    • External wiki
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • sac-group
  • sac2csac2c
  • Issues
  • #2298
Closed
Open
Created Feb 23, 2022 by Sven-Bodo Scholz@sbsOwner

Code generation for Multi-Operator WL initialisation problem

The following code, when compiled with -noprelude using

-sbs-Bodos-IMac-> sac2c -V
sac2c 1.3.3-MijasCosta-771-g499e7
build-type: RELEASE
built-by: "sbs" at 2022-02-20T11:53:21
int[*], int[*] scanP( int[*] a)
{
    shp = _shape_A_(a);
    a, tots = with {
                  (_mul_SxV_(0,shp) <= iv < shp) : (0,1);
               } : ( genarray( shp, 32), genarray( shp, 0));
    return (a,tots);
}

noinline
int[*] hide( int x)
{
    return (_eq_SxS_( x, 0) ? 0 : [1,1] );
}

int main()
{
   a = hide ( 42);

   b,c = scanP (a);

   return c;
}

leads to an uninitialised wlidx variable:

-sbs-Bodos-IMac-> sac2c new_error.sac
/Volumes/Users/sbs/Dropbox/BodoSac/scan/a.out.c:1491:24: warning: variable 'SACp_wlidx_2109_c' is uninitialized when used here [-Wuninitialized]
    { SACp_emal_2243_c[SACp_wlidx_2109_c] = SACp_emal_2249__pinl_79__flat_6; };
                       ^~~~~~~~~~~~~~~~~
/Volumes/Users/sbs/Dropbox/BodoSac/scan/a.out.c:1301:26: note: initialize the variable 'SACp_wlidx_2109_c' to silence this warning
    int SACp_wlidx_2109_c;
                         ^
                          = 0
1 warning generated.
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking