Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • 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 334
    • Issues 334
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 14
    • Merge requests 14
  • Deployments
    • Deployments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Infrastructure Registry
  • External wiki
    • External wiki
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • sac-group
  • sac2csac2c
  • Issues
  • #1138

Closed
Open
Created Oct 01, 2012 by Robert Bernecky@rbeDeveloper

First nested array bug: modarray does not work on nested arrays

Bugzilla Link 1025
Created on Oct 01, 2012 21:05
Version svn
OS Linux
Architecture PC

Extended Description

sac2c -V
sac2c v1.00-beta (Haggis And Apple)
 developer rev 18236:MODIFIED linux-gnu_x86_64
 (Mon Oct  1 11:57:46 EDT 2012 by sac)
This simple example of nested array code fails, due to TC not
liking non-simple array arguments:
cat crud2.sac 
/*
 * Simple example of nested array use in sac2c:
 * Construct (iota(3), iota(4), iota(5)...).
 *
 */
use Array:all;
nested int[.] vec;
int main()
{
  hole = enclose_vec ( [42] );
  x = 3 + iota(10);
  z = [ hole, hole, hole, hole, hole, hole, hole, hole, hole, hole];
  for( i=0; i<20; i++ ) {
    z = _modarray_AxVxS_( z, [i], enclose_vec( iota( x[i])));
  }
  StdIO::print(z);
  return(0);
}
The problem is that NTCCTprf_modarray_AxVxS calls TEassureSameSimpleType,
which wants, oddly enough, a SimpleType. Which z is not.
Question for Dr. TC: Can we simply relax that test (handwave, handwave)
to a make it a call to the (non-existent) TCassureSameType?
Or is the pit deeper than that?
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking