Skip to content

Commit

Permalink
- bugfix for BUG-1409 introduced in 7745
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@7789 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
Jens Frenkel committed Jan 27, 2011
1 parent 8e17c9f commit 6e177f3
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions Compiler/BackEnd/BackendDAEOptimize.mo
Expand Up @@ -1003,16 +1003,18 @@ algorithm
outExp := matchcontinue(inExp)
local
DAE.Exp e;
Boolean b;
Boolean b,b1,b2;
BackendDAE.Variables vars,knvars;
DAE.ComponentRef cr;

case((e as DAE.CREF(DAE.CREF_IDENT(ident = "time",subscriptLst = {}),_), (_,vars,knvars))) then ((e,false,(true,vars,knvars)));
case((e as DAE.CREF(componentRef = cr),(_,vars,knvars)))
case((e as DAE.CREF(DAE.CREF_IDENT(ident = "time",subscriptLst = {}),_), (_,vars,knvars)))
then ((e,false,(true,vars,knvars)));
case((e as DAE.CREF(componentRef = cr),(b,vars,knvars)))
equation
b = BackendVariable.isTopLevelInputOrOutput(cr,vars,knvars);
b1 = BackendVariable.isTopLevelInputOrOutput(cr,vars,knvars);
b2 = b or b1;
then
((e,not b,(b,vars,knvars)));
((e,not b2,(b2,vars,knvars)));
case((e as DAE.CALL(path = Absyn.IDENT(name = "sample"), expLst = {_,_}), (_,vars,knvars))) then ((e,false,(true,vars,knvars) ));
case((e as DAE.CALL(path = Absyn.IDENT(name = "pre"), expLst = {_}), (_,vars,knvars))) then ((e,false,(true,vars,knvars) ));
case((e,(b,vars,knvars))) then ((e,not b,(b,vars,knvars)));
Expand Down

0 comments on commit 6e177f3

Please sign in to comment.