|
|
Bugzilla Link |
962 |
Created on |
Jun 01, 2012 19:22 |
Resolution |
FIXED |
Resolved on |
Jun 19, 2012 14:33 |
Version |
svn |
OS |
Linux |
Architecture |
PC |
Extended Description
Or so I'm guessing. If I somehow have the type of the petl args wrong,
maybe that's causing it?
Build #17858 TC fails to simplify the addition of constants to create
_ivexp_1865, here:
bool _MAIN::main__Cond_1( int{42} _petl_744_rep__SSA0_1 { dim: 0, shape: [:int],NN } , int rep { dim: 0, shape: [:int],NN, minval: _petl_744_rep__SSA0_1 } , bool _flat_2 { dim: 0, shape: [:int],NN } )
/*
* main__Cond_1 :: ---
*/
{
int _ivexp_1865 { , NN } ;
int{-25} _esd_461 { dim: 0, shape: [:int], NN } ;
int _ctz_458 { dim: 0, shape: [:int], YN, minval: _ivexp_1865 } ;
int{0} _ctz_459 { dim: 0, shape: [:int], NN } ;
bool z__SSA0_2 { dim: 0, shape: [:int], NN } ;
bool{0} z__SSA0_1 { dim: 0, shape: [:int], NN } ;
bool z { dim: 0, shape: [:int], NN } ;
if (_flat_2)
{
_esd_461 = -25;
_ivexp_1865 = _add_SxS_( _petl_744_rep__SSA0_1, _esd_461);
Invoked this way:
sac2c condfun.sac -v1 -doawlf -nowlf
Here is condfun.sac:
bool[*] cond( bool[*] y)
{
z = false;
if( y) {
z = true;
}
return(z);
}
int[*] akd( int[*] y)
{ return(y);
}
int main ()
{
rep = akd( 25);
rep = _max_SxS_( rep, 42);
if( cond(true)) {
z = _gt_SxS_( rep, 25);
} else {
z = false;
}
z = _toi_S_(z);
z = _sub_SxS_( z, 1);
return(z);
}