wltransform / might be connected to bug #11
|
|
Bugzilla Link |
12 |
Created on |
Apr 10, 2003 14:42 |
Resolution |
FIXED |
Resolved on |
Apr 10, 2003 15:29 |
Version |
1.00beta |
OS |
SunOS |
Architecture |
Sun |
Extended Description
sac2c -O3 -sbs -fun2lac 13 -ssa -noTSI -noAP -maxlur 3 -maxwlur 12
fails with:
** 15: Transforming with-loop representation: ...
Assertion 'expr' failed: file 'wltransform.c', line 2568
The use of both, ++ and iota, seems to be essential here...
int[*] (++)( int[1] arr_a, int[+] arr_b)
{
new_shp = _modarray_( _shape_( arr_a),
[0],
_add_SxS_( _sel_([0], _shape_( arr_a)),
_sel_([0], _shape_( arr_b)) ) );
res = with( . <= iv < _shape_( arr_a))
genarray( new_shp, _sel_( iv, arr_a));
offset = _modarray_( _mul_SxA_( 0, new_shp),
[0],
_sel_([0], _shape_( arr_a)) );
res = with( offset <= iv <= .)
modarray( res, iv, _sel_( _sub_AxA_( iv, offset), arr_b));
return( res);
}
int[+] iota( int[+] shp)
{
res = with( . <= [i] <= .)
genarray( shp, i);
return( res);
}
int main()
{
tmp = iota([100]);
res = [1] ++ tmp ;
return( _sel_([0], res) );
}