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.