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 405
    • Issues 405
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 11
    • Merge requests 11
  • Deployments
    • Deployments
    • Releases
  • Wiki
    • Wiki
  • External wiki
    • External wiki
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • sac-group
  • sac2csac2c
  • Issues
  • #2531
Closed
Open
Created Jan 30, 2026 by Sven-Bodo Scholz@sbsOwner

weird issue in WRCI

When compiling

module ArrayTransform;

use ArrayBasics: { sel};

export all;

inline
int[n,d:shp] reverse(int[n,d:shp] A)
{
    return { [i] -> A[_sub_SxS_(_sub_SxS_(n, 1), i)] | [i] < [n] };
}


inline
bool[d:shp_t] transpose(bool[d:shp] A)
    | _all_V_(_eq_VxV_(reverse(shp), shp_t))
{
    shp_t = reverse(shp);
    return { iv -> _sel_VxA_(reverse(iv), A) | iv < shp_t };
}

with sac2c-d -noprelude -maxoptcyc 0 ArrayTransform.sac -v4 -#d,WRCI, I get:

...
 MatchingRCs: WRCI: looking for matching RC -> _pinl_70__flat_18
WRCIgenarray: WRCI: Genarray RCs:
    WRCIwith: WRCI: Looking for A[iv] only use...
    WRCIwith: WRCI: candidates after conventional reuse:
    WRCIwith: WRCI: Looking for more complex reuse candidates...
Internal compiler error
Assertion "(NTYPE_CON (array) == TC_aks) || (NTYPE_CON (array) == TC_akv) || (NTYPE_CON (array) == TC_akd)" failed at /Volumes/Users/sbs/sac2c/src/libsac2c/typecheck/new_types.c:883 -- TYgetDim applied to other than AKV, AKS or AKD type!
Please file a bug at: https://gitlab.sac-home.org/sac-group/sac2c/-/issues
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking