Skip to content

Commit

Permalink
Fix ticket:4228
Browse files Browse the repository at this point in the history
  • Loading branch information
lochel authored and OpenModelica-Hudson committed Jan 23, 2017
1 parent 399ee41 commit 67c5d45
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions Compiler/BackEnd/FindZeroCrossings.mo
Expand Up @@ -1094,7 +1094,6 @@ algorithm
DAE.Operator op;
Integer numEqual, alg_indx, itmp, numMathFunctions, oldNumRelations;
list<Integer> eqs;
Boolean b1, b2;
DAE.Exp startvalue, stepvalue;
Option<DAE.Exp> stepvalueopt;
Integer istart, istep;
Expand Down Expand Up @@ -1172,8 +1171,7 @@ algorithm
(e_2, (iterator, inExpLst, range, (zeroCrossingsDummy, relations, samples, numMathFunctions), tp1 as (alg_indx, _, _))) := Expression.traverseExpTopDown(e2, collectZCAlgsFor, (iterator, inExpLst, range, (zeroCrossingsDummy, relations, samples, numMathFunctions), tp1));
if intGt(DoubleEndedList.length(relations), oldNumRelations) then
e_1 := DAE.LBINARY(e_1, op, e_2);
b1 := Expression.expContains(e1, iterator);
if if b1 then true else Expression.expContains(e2, iterator) then
if Expression.expContains(e1, iterator) or Expression.expContains(e2, iterator) then
(explst, itmp) := replaceIteratorWithStaticValues(e_1, iterator, inExpLst, DoubleEndedList.length(relations));
zc_lst := createZeroCrossings(explst, {alg_indx});
ZeroCrossings.add_list(zeroCrossings, zc_lst);
Expand Down
2 changes: 1 addition & 1 deletion Compiler/FrontEnd/Expression.mo
Expand Up @@ -9431,7 +9431,7 @@ algorithm
case (DAE.CALL(expLst = {}),_) then false;

// general case for arguments
case (DAE.CALL(expLst = args),(cr as DAE.CREF()))
case (DAE.CALL(expLst = args), cr)
equation
res = List.map1BoolOr(args, expContains, cr);
then
Expand Down

0 comments on commit 67c5d45

Please sign in to comment.