Explicit specialisation rejected on complex
|
|
Bugzilla Link |
595 |
Created on |
Nov 14, 2009 17:23 |
Resolution |
FIXED |
Resolved on |
Nov 17, 2009 21:21 |
Version |
1.00beta |
OS |
All |
Architecture |
PC |
Attachments |
specbug.tar.gz, tutu2.sac
|
Extended Description
Created an attachment (id=603)
Source code to reproduce behaviour (archive contains both modules)
sac2c rev. 16550
The following code leads to an "inferred types out of bounds" error:
---
module Star;
use Structures : all;
export all;
complex[*] star( complex[*] input)
{
res = genarray( shape( input), toc( 0.0d));
return( res);
}
---
---
module Spec;
use Structures : all;
import Star: all;
export all;
specialize complex[.,.,.] star( complex[3,3,3] input);
---
sac2c Star.sac; sac2c Spec.sac leads to:
[...]
** 6: Running type inference system ...
**** Enforcing Specializations ...
**** Running type inference system ...
ABORT: line 6 file: Star.sac
ABORT: Component #0 of inferred return type (ComplexBasics::complex[*]) is
ABORT: not within #18: in [ --, Structures::complex[.,.,.]] le < 0> ge <>