AWLF unit test UTReshape.sac crashes if compiled with -ecc
|
|
Bugzilla Link |
987 |
Created on |
Jun 22, 2012 21:57 |
Version |
svn |
OS |
Linux |
Architecture |
PC |
Extended Description
sac2c -V
sac2c v1.00-beta (Haggis And Apple)
developer rev 18017:MODIFIED linux-gnu_x86_64
(Fri Jun 22 11:17:42 EDT 2012 by sac)
cd ~/sac/testsuite/optimizations/awlf
sac2c UTReshape.sac -ecc
...
Applying associative law ...
stdopt/associative_law.c:925 Assertion "TYeqTypes( IDS_NTYPE( ids), ID_NTYPE( EXPRS_EXPR( exprs)))" failed!
Bug in guards: result id '_idc_3246' and arg id '_flat_1100' do have different types
This is in main(). Although tripped up by AL, I suspect the problem
occurs much earlier, during IDC. Here is the relevant IL after -b9:
int[3] _idc_3247 { , NN } ;
int[3] _idc_3246 { , NN } ;
bool _icc_3244_pred { , NN } ;
bool _hce_1__SSA0_2 { , NN } ;
bool{0} _hce_1__SSA0_1 { , NN } ;
int[.] _flat_1101 { , NN } ;
int[3]{2,3...} _flat_1100 { , NN } ;
bool[3] _flat_1099 { , NN } ;
bool _hce_1 { , NN } ;
bool[3] _icc_3245 { , NN } ;
if (_flat_1096)
{
_flat_1101 = _shape_A_( arr_b);
_flat_1100 = _shape_A_( arr_a);
_idc_3246, _idc_3247, _icc_3244_pred = _same_shape_AxA_( _flat_1100, _flat_1101);
Note that the type of _idc_3247 is int[3], whereas its corresponding
argument, PRF_ARG2, is int[.]. I think this is what AL is griping about.
I am assigning this to the keeper of IDC and the type checker.