Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • sac2c sac2c
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 403
    • Issues 403
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 12
    • Merge requests 12
  • Deployments
    • Deployments
    • Releases
  • Wiki
    • Wiki
  • External wiki
    • External wiki
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • sac-group
  • sac2csac2c
  • Issues
  • #2094
Closed
Open
Created Aug 20, 2009 by Frank Penczek@fpzGuest

Inferred type not within bounds

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)
---
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking