Skip to content

Commit

Permalink
BackendDAEUtil.tryToSolveOrDerive: guard vs. zero --> zero no depende…
Browse files Browse the repository at this point in the history
…nce --> UNSOLVABLE
  • Loading branch information
vruge authored and OpenModelica-Hudson committed Mar 7, 2016
1 parent 80b17a1 commit 1916068
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Compiler/BackEnd/BackendDAEUtil.mo
Expand Up @@ -4685,6 +4685,11 @@ algorithm
end match;
then (f,false);
end matchcontinue;
if Expression.isZero(f) then
// see. https://trac.openmodelica.org/OpenModelica/ticket/3742#comment:12
// ExpressionSolve will fail for f == 0 --> internal loops inside tearing
fail();
end if;
//print("\ntryToSolveOrDerive=>" +ExpressionDump.printExpStr( Expression.crefExp(cr)) + "\nIN: " + ExpressionDump.printExpStr(e) + "\nOUT: " + ExpressionDump.printExpStr(f));
end tryToSolveOrDerive;

Expand Down

0 comments on commit 1916068

Please sign in to comment.