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
  • #2527
Closed
Open
Created Jan 27, 2026 by Sven-Bodo Scholz@sbsOwner

stacktrace shape wrong

When compiling

use Array: all;

int main ()
{
    a = _hideDim_SxA_ ( 1, [1,2,3,4,5,6,7,8]);
    b = reshape( [2,2,2], a);
    StdIO::print ( a+b);
    return 0;
}

with sac2c -check cps tutu.sac

using

sac2c 2.1.0-PuurGeluk-189-gd02ae
build-type: DEBUG
built-by: "sbs" at 2026-01-24T22:38:39

I get:

*** Stack trace:
 ╰⟶ main tried to call (a +<[8],[2,0,2]>b) at ./tutu.sac:7:20 but the predicates of + did not hold.

*** SAC runtime error
*** In //Users/sbs/sacbase/Stdlib/build/src-seq_checks/structures/ArrayArith.sac, line 111, column 1
*** Type pattern error in application of +: the found value of `d' in `d:shp' of argument `B' is not equal to the defined value of `A'

*** Stack trace:
 ╰⟶ main tried to call (a +<[8],[2,0,2]>b) at ./tutu.sac:7:20 but the predicates of + did not hold.

*** SAC runtime error
*** In //Users/sbs/sacbase/Stdlib/build/src-seq_checks/structures/ArrayArith.sac, line 111, column 1
*** Type pattern error in application of +: the found value of `shp' in `d:shp' of argument `B' is not equal to the defined value of `A'

but the shapes are [8] and [2,2,2] and not [2,0,2].

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking