Skip to content

Commit

Permalink
[NF] Fix simplification of transpose.
Browse files Browse the repository at this point in the history
- Check that the second dimension of the argument to transpose is also
  expanded before trying to simplify the call.

Belonging to [master]:
  - OpenModelica/OMCompiler#2659
  • Loading branch information
perost authored and OpenModelica-Hudson committed Sep 17, 2018
1 parent 049ab69 commit 232b213
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Compiler/NFFrontEnd/NFSimplifyExp.mo
Expand Up @@ -259,7 +259,10 @@ function simplifyTranspose
output Expression exp;
algorithm
exp := match arg
case Expression.ARRAY() then Expression.transposeArray(arg);
case Expression.ARRAY()
guard List.all(arg.elements, Expression.isArray)
then Expression.transposeArray(arg);

else Expression.CALL(call);
end match;
end simplifyTranspose;
Expand Down

0 comments on commit 232b213

Please sign in to comment.