Skip to content

Commit

Permalink
[NB] consider name nodes dummy variables (#11992)
Browse files Browse the repository at this point in the history
- some name nodes remain after lowering (e.g. reduction fold expressions) skip them by considering them as dummy variables
  • Loading branch information
kabdelhak committed Feb 15, 2024
1 parent 4f5176c commit a9d2e06
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions OMCompiler/Compiler/NBackEnd/Classes/NBVariable.mo
Expand Up @@ -219,6 +219,7 @@ public
local
Pointer<Variable> varPointer;
case ComponentRef.CREF(node = InstNode.VAR_NODE(varPointer = varPointer)) then varPointer;
case ComponentRef.CREF(node = InstNode.NAME_NODE()) then Pointer.create(DUMMY_VARIABLE);
else algorithm
Error.addMessage(Error.INTERNAL_ERROR,{getInstanceName() + " failed for " + ComponentRef.toString(cref) +
", because of wrong InstNode (not VAR_NODE). Show lowering errors with -d=failtrace."});
Expand Down
1 change: 1 addition & 0 deletions OMCompiler/Compiler/NFFrontEnd/NFInstNode.mo
Expand Up @@ -898,6 +898,7 @@ uniontype InstNode
component := match node
case COMPONENT_NODE() then Pointer.access(node.component);
case VAR_NODE() then Component.WILD();
case NAME_NODE() then Component.WILD();
end match;
end component;

Expand Down

0 comments on commit a9d2e06

Please sign in to comment.