-ecc semantics of non_neg_val_V_ are too strict for fold-WL
|
|
Bugzilla Link |
432 |
Created on |
Jun 11, 2008 21:22 |
Resolution |
FIXED |
Resolved on |
Jul 10, 2014 22:38 |
Version |
1.00beta |
OS |
Linux |
Architecture |
PC |
Extended Description
The function below, courtesy CG, compiles with errors if compiled with -ecc:
> ERROR: line 5
> ERROR: argument #1 of "_non_neg_val_V_" should not contain negative
> values;
> ERROR: type found: int[1]{-1}
> ERROR: line 5
> ERROR: argument #1 of "_non_neg_val_V_" should not contain negative
> values;
> ERROR: type found: int[1]{-1}
>
import ScalarArith: all;
int main()
{
a = with { ([-1] <=iv < [2]) : 1; }: fold(+, 0);
return(a);
}
According to His Royal Correctness (Bodo), the ability of a WL index vector
to take on arbitrary values when used in a FOLD-WL on Wednesday, is legitimate,
even though it's illegal for non-fold WLs.