|
|
Bugzilla Link |
556 |
Created on |
Aug 20, 2009 16:51 |
Resolution |
FIXED |
Resolved on |
Nov 18, 2009 04:12 |
Version |
1.00beta |
OS |
All |
Architecture |
PC |
Attachments |
tmp.sac, bug556_tiny.sac
|
Extended Description
Created an attachment (id=561)
Source code to reproduce behaviour
Using rev16340 of sac2c, compilation of the following program aborts reporting an error about inferred types being out of bounds:
---
module badbounds;
use Structures : all;
use Numerical : all;
export {badbounds};
complex[.,.,.,.] badbounds( complex[.,.,.] input)
{
result =
with
{
( [0,0,0,0] <= [i,j,k,l] < [1,1,1,1]) : input[0,0,0];
} : genarray( [1,1,1,1], toc(0,0));
return( result);
}
---
The (clipped) compiler output reads:
---
[...]
**** Optimization cycle pass: 3
****** Optimizing wrapper function:
****** bounds::bounds( double[+]): ...
****** Optimizing wrapper function:
****** bounds:Structures::sel( int[*], double[+]): ...
****** Optimizing regular function:
****** bounds::bounds( double[.,.,.,.]): ...
****** Optimizing regular function:
****** ComplexArrayBasics::sel( int[.], double[+]): ...
****** Optimizing regular function:
****** ComplexArrayBasics::sel( int, double[+]): ...
****** Optimizing regular function:
****** sacprelude::eq( int[*], int[*]): ...
****** Optimizing regular function:
****** sacprelude::eq( float[*], float[*]): ...
****** Optimizing regular function:
****** sacprelude::eq( double[*], double[*]): ...
****** Optimizing regular function:
****** sacprelude::eq( bool[*], bool[*]): ...
****** Optimizing regular function:
****** sacprelude::eq( char[*], char[*]): ...
****** Optimizing regular function:
****** bounds:ComplexArrayBasics::shape( double[.,.,.,.]): ...
****** Optimizing regular function:
****** bounds:Structures::sel( int[3], double[.,.,.,.]): ...
ABORT: line 62 file: ComplexArrayBasics.sac
ABORT: Component #0 of inferred return type (double[.]) is not within
#380:
ABORT: in [ --, double[2]] le <> ge <>
*** Compilation failed ***
*** Exit code 73 (Running SAC optimizations)
*** 1 Error(s), 1 Warning(s)
---