Skip to content

Commit

Permalink
- fix tests, report less warnings Alias variables ... have start valu…
Browse files Browse the repository at this point in the history
…es ...

git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@13552 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
Jens Frenkel committed Oct 22, 2012
1 parent b9a2ad2 commit 89bd92d
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions Compiler/BackEnd/BackendVariable.mo
Expand Up @@ -3713,7 +3713,7 @@ algorithm
local
DAE.Exp exp2_1,exp1_1;
Integer i,ia;
Boolean b;
Boolean b1,b2;
Option<DAE.Exp> origin;
/* case (_,_,_,_,_)
equation
Expand Down Expand Up @@ -3743,10 +3743,12 @@ algorithm
case (_,_,_,_,_)
equation
// simple evaluation, by replace crefs with bind expressions recursivly
((exp1_1, (_,b,_))) = Expression.traverseExp(exp1, replaceCrefWithBindExp, (knVars,false,HashSet.emptyHashSet()));
((exp2_1, _)) = Expression.traverseExp(exp2, replaceCrefWithBindExp, (knVars,false,HashSet.emptyHashSet()));
((exp1_1, (_,b1,_))) = Expression.traverseExp(exp1, replaceCrefWithBindExp, (knVars,false,HashSet.emptyHashSet()));
((exp2_1, (_,b2,_))) = Expression.traverseExp(exp2, replaceCrefWithBindExp, (knVars,false,HashSet.emptyHashSet()));
(exp1_1,_) = ExpressionSimplify.condsimplify(b1,exp1_1);
(exp2_1,_) = ExpressionSimplify.condsimplify(b2,exp2_1);
true = Expression.expEqual(exp1_1, exp2_1);
exp1_1 = Util.if_(b,exp1,exp2);
exp1_1 = Util.if_(b1,exp1,exp2);
// use highest origin
i = startOriginToValue(so);
ia = startOriginToValue(sao);
Expand Down

0 comments on commit 89bd92d

Please sign in to comment.