DFR appears not to be working
|
|
Bugzilla Link |
983 |
Created on |
Jun 19, 2012 19:08 |
Resolution |
FIXED |
Resolved on |
Sep 29, 2017 15:02 |
Version |
svn |
OS |
Linux |
Architecture |
PC |
Extended Description
One of the CF unit tests now crashes in the -NOCF mode:
sac2c -V
sac2c v1.00-beta (Haggis And Apple)
developer rev 17951:MODIFIED linux-gnu_x86_64
(Tue Jun 19 13:34:21 EDT 2012 by sac)
cd ~/sac/testsuite/optimizations/constantfolding
sac2c SCSprf_toi.sac -v0 -maxwlur 1 -doawlf -v4 -noewlcf -nocf
gets a segfault from running out of memory. What seems to be happening
is that the code volume grows on each iteration (also slowing things down
a whole lot), and we end up with many copies of dead Loop() functions.
The code is fairly simple: cat SCSprf_toi.sac
/* Unit test for SCSprf_toi() */
/* RESULT: _toi_S_ 1 0 -maxwlur 1 */
/* FILTER: no-no */
int main ()
{
x = 0;
for (ib=0; _le_SxS_( ib, 3); ib = _add_SxS_( ib, 1)){
x = with { ([0] <= [ix] <= [8])
/* CF should make this toi go away */
: _toi_S_( _mul_SxS_( 2, _div_SxS_( ix, 2))); }
: genarray([9], 0);
}
z = _sel_VxA_([7], x);
z = _sub_SxS_(z, 6);
return(z);
}