Skip to content

Commit

Permalink
Fix ticket:4611.
Browse files Browse the repository at this point in the history
- Fix counting of complex equations in checkModel.

Belonging to [master]:
  - OpenModelica/OMCompiler#1977
  - OpenModelica/OpenModelica-testsuite#761
  • Loading branch information
perost authored and OpenModelica-Hudson committed Nov 6, 2017
1 parent 23c2c8b commit 0f09961
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Compiler/FrontEnd/CheckModel.mo
Expand Up @@ -191,7 +191,7 @@ algorithm
case DAE.ARRAY_EQUATION(dimension=dims)
equation
(varSize, eqnSize, eqns, hs) = inArg;
size = List.fold(Expression.dimensionsSizes(dims), intMul, 1);
size = Expression.sizeOf(Expression.typeof(inElt.exp));
then (varSize, eqnSize+size, inElt::eqns, hs);

// initial array equations
Expand Down
1 change: 1 addition & 0 deletions Compiler/FrontEnd/Expression.mo
Expand Up @@ -2135,6 +2135,7 @@ algorithm
case DAE.T_ARRAY(dims = ad)
equation
nr = dimensionSize(List.reduce(ad, dimensionsMult));
nr = nr * sizeOf(inType.ty);
then
nr;

Expand Down

0 comments on commit 0f09961

Please sign in to comment.