|
|
Bugzilla Link |
964 |
Created on |
Jun 01, 2012 21:34 |
Version |
svn |
OS |
Linux |
Architecture |
PC |
Extended Description
I have this code, and I want PM to get me to _pinl_2005_idc_1362:
_pinl_2005__idc_1362 = [ _flat_27, _uprf_2801 ];
...
_pinl_2007__idc_1363, _pinl_2006__icc_1360_pred = _prod_matches_prod_shape_VxA_( _pinl_2005__idc_1362, _pinl_2008__icc_1447);
Here is the pattern used by IVUTisShapesMatch:
pat1 = PMvar( 1, PMAgetNode( &shp), 0);
pat2 = PMvar( 1, PMAisNode( &shp), 0);
z = ( PMmatchFlatSkipExtremaAndGuards( pat1, AVIS_SHAPE( pavis)) &&
PMmatchFlatSkipExtremaAndGuards( pat2, AVIS_SHAPE( cavis)));
AVIS_SHAPE( pavis) points to _pinl_2007__idc_1363.
I expected that the search should skip the guard, and then stop.
However, I set breakpoints at PMMisInGuards, and we never
stop there. Which seems odd to me.
The code in pattern_match_modes.c has a plausible look to it.
Ergo, I are confused.
Compiled on Build #17858 with these options:
sac2c -v1 crud.sac -doawlf -nowlf -bopt:uglf >crud
Here is the offending crud.sac:
use Array:{+,-,sum,prod,toi,genarray,<,iota};
inline int[*] rhoIII(int[.] x, int y)
{ /* Vector reshape scalar to matrix) */
zxrho = prod(toi(x)); /* Result element count */
z = genarray([zxrho], y); /* allocate result */
z = _reshape_VxA_(toi(x),z);
return(z);
}
int[*] id( int[*] y)
{ return(y);
}
int main()
{
siz = id( 50);
mat=rhoIII([ 50,siz],42);
z = sum(mat);
StdIO::print(z);
return(0);
}