Skip to content

Commit

Permalink
Fix for bug #1133:
Browse files Browse the repository at this point in the history
- Added support for reinit in DAELow.lowerStatementInputsOutputs.
- Added test case libraries/msl31/Modelica.Mechanics.


git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@6173 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
perost committed Sep 22, 2010
1 parent d7d5b8d commit dae6b64
Show file tree
Hide file tree
Showing 2 changed files with 325 additions and 1,562 deletions.
15 changes: 8 additions & 7 deletions Compiler/DAELow.mo
Expand Up @@ -5445,16 +5445,10 @@ protected function lowerStatementInputsOutputs
algorithm
(outExpExpLst1,outExpExpLst2) := matchcontinue (inVariables,inStatement)
local
list<DAE.Exp> inputs;
list<DAE.Exp> inputs1;
list<DAE.Exp> inputs2;
list<DAE.Exp> outputs;
list<DAE.Exp> outputs1;
list<DAE.Exp> outputs2;
Variables vars;
DAE.ExpType tp;
DAE.ComponentRef cr;
DAE.Exp e;
DAE.Exp e, e2;
list<Algorithm.Statement> statements;
Algorithm.Statement stmt;
list<DAE.Exp> expl;
Expand Down Expand Up @@ -5556,6 +5550,13 @@ algorithm
inputs = statesAndVarsExp(e, vars);
then
(inputs, {});

case(vars, DAE.STMT_REINIT(var = e as DAE.CREF(componentRef = _), value = e2))
equation
inputs = statesAndVarsExp(e2, vars);
then
(e :: inputs, {});

case(_, _)
equation
Debug.fprintln("failtrace", "- DAELow.lowerStatementInputsOutputs failed\n");
Expand Down

0 comments on commit dae6b64

Please sign in to comment.