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
  • Merge requests
  • !606

Hotfix 2533

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Thomas Koopman requested to merge thomas/sac2c:hotfix-2533 into develop Feb 02, 2026
  • Overview 0
  • Commits 1
  • Changes 1

Closes #2533 (closed)

Objects that are implemented via the FFI are of type HID (and sometimes UNQ) from the perspective of the code generation. We cannot do anything with them except via external function calls. The distributed-memory backend handles these by only allowing one node (SAC_DISTMEM_RANK_SOURCE) to use these variables. The generated code looked like

if (SAC_DISTMEM_rank =  SAC_DISTMEM_RANK_SOURCE) {
    UNQ = external_func(...);
} else {
    UNQ = NULL;
}

so that if another node tries to illegally use UNQ, it will segfault. However, with the addition of ctype, UNQ may have another type, so it now looks like

T UNQ = (T)0;
...
if (SAC_DISTMEM_rank =  SAC_DISTMEM_RANK_SOURCE) {
    UNQ = external_func(...);
} else {
    UNQ = NULL;
}

and that makes the = NULL assignment illegal. It is also not necessary, as UNQ is already initialized upon declaration. So I have removed this code.

Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: hotfix-2533