Skip to content

Commit

Permalink
- check expression type before transform to residual form in if-equat…
Browse files Browse the repository at this point in the history
…ion simplification. (do no transform boolean equations to 0 = ...), this causes my some tests to fail, but if a test fail we have to at a ticket in trac, the check is really necessary

git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@13121 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
Jens Frenkel committed Oct 1, 2012
1 parent 661c8bf commit 65c8b0f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Compiler/BackEnd/BackendDAEOptimize.mo
Expand Up @@ -78,6 +78,7 @@ protected import List;
protected import Matching;
protected import SCode;
protected import System;
protected import Types;
protected import Util;
protected import Values;
protected import ValuesUtil;
Expand Down Expand Up @@ -11614,9 +11615,12 @@ algorithm
DAE.Exp e1,e2;
DAE.ComponentRef cr1;
String str;
DAE.Type ty;
// normal equation
case(BackendDAE.EQUATION(exp=e1,scalar=e2))
equation
ty = Expression.typeof(e1);
true = Types.isIntegerOrRealOrSubTypeOfEither(ty);
oExp = Expression.expSub(e1,e2);
then
oExp;
Expand Down

0 comments on commit 65c8b0f

Please sign in to comment.