CF misses selection from structural constant
|
|
Bugzilla Link |
1041 |
Created on |
Dec 19, 2012 23:54 |
Resolution |
FIXED |
Resolved on |
Dec 20, 2012 22:02 |
Version |
svn |
OS |
Linux |
Architecture |
PC |
Attachments |
crud3.sac |
Extended Description
Created an attachment (id=943)
source code to reproduce fault
This one is very old apparently, but it's getting in my way today.
We have something like this:
vec = [ m, n];
vec2 = _idx_modarray_AxSxS_( vec, 0, q);
cols = _idx_sel_( 1, vec2);
This could be simplified to:
cols = n;
The circumstances are that the two idx() indices
are constant and NOT the same, and PRF_ARG1 of the modarray is
a structural constant. In that case, we treat the expression
as if we had been given:
cols = _idx_sel_( 1, vec);
This is already handled by CF.
sac2c -V
sac2c v1.00-beta (Haggis And Apple)
developer rev 18046 linux-gnu_x86_64
(Wed Dec 19 16:40:34 EST 2012 by sac)
Compile with:
sac2c crud3.sac -doawlf -nowlf -v1 -bopt >crud