sac2c doesn't like fold early on...
|
|
Bugzilla Link |
1106 |
Created on |
Dec 28, 2013 22:59 |
Resolution |
FIXED |
Resolved on |
Jan 10, 2014 19:14 |
Version |
svn |
OS |
Linux |
Architecture |
PC |
Extended Description
sac2c -V
sac2c v1.00-beta (Haggis And Apple)
developer rev 18415 linux-gnu_x86_64
(Fri Dec 27 16:07:39 EST 2013 by sac)
sac@rattler:~/sac/testsuite/optimizations/awlf$ sac2c crud.sac
warning: AWLF is enabled: -ecc enabled.
warning: AWLF is enabled: -extrema enabled.
warning: AWLF is enabled: -maxoptcyc=20
** 1: Loading SAC program ...
**** Locating source code ...
Reading from file "./crud.sac" ...
**** Running C preprocessor ...
**** Parsing input file ...
** 2: Preprocessing SAC program ...
**** Hiding struct definitions behind typedefs and accessors ...
**** Handling zero-generator with-loops ...
**** Handling multi-generator with-loops ...
TRAVERSE ERROR: node of type 95:N_spid found where 72:N_spfold was expected!
------------------------------------------
cat crud.sac
int main ()
{
pwl = with {
( [ 0, 20] <= iv=[j,k] < [ 20, 40 ] ) : 42;
( [ 15, 0] <= iv=[j,k] < [ 20, 20 ] ) : 666;
( [ 0, 0 ] <= iv=[j,k] < [ 15, 20 ] ) : k;
} : fold( plus, 0);
StdIO::print( pwl);
return(0);
}
inline
int plus( int x, int y)
{
z = _add_SxS_( x, y);
return( z);
}