TC appears to be confused about constant-valued CONDfun in SCSprf_idx_sel3.sac
|
|
Bugzilla Link |
864 |
Created on |
Aug 28, 2011 20:12 |
Resolution |
FIXED |
Resolved on |
Oct 10, 2011 18:48 |
Version |
svn |
OS |
Linux |
Architecture |
PC |
Attachments |
SCSprf_idx_sel3.sac |
Extended Description
Created an attachment (id=815)
source code to reproduce failure
Summary says it all; failure in CF unit test, when testing with CF disabled:
sac2c -V
sac2c v1.00-beta (Haggis And Apple)
developer rev 17576:MODIFIED linux-gnu_x86_64
(Sun Aug 28 13:47:43 EDT 2011 by sac)
cd :~/sac/testsuite/optimizations/constantfolding
sac2c SCSprf_idx_sel3.sac -nocf
ERROR: line 165 file: sacprelude.sac
ERROR: loop variable "p" is being used inconsistently in function
ERROR: _dup_112_partitionMax__Cond_0; conflicting types are bool and #481:
ERROR: in [ --, bool{0}] le <> ge <>
What is interesting here is that the entire function is constants:
/****************************************************************************
* Cond function of _MAIN::main(...):
* sacprelude::_dup_112_partitionMax__Cond_0(...) [ body ]
****************************************************************************/
int{2} sacprelude::_dup_112_partitionMax__Cond_0( bool{0} p { dim: 0, shape: [:int],NN } , int{2} y { dim: 0, shape: [:int],NN } , int{0} x { dim: 0, shape: [:int],NN } )
/*
* _dup_112_partitionMax__Cond_0 :: ---
*/
{
int{2} _hce_0__SSA0_2 { dim: 0, shape: [:int], NN } ;
if (p)
{
}
else
{
}
_hce_0__SSA0_2 = ( p ? x : y );
return( _hce_0__SSA0_2);
}