Opened 11 years ago
Last modified 11 years ago
#2982 closed defect
sorting of protected variable in a function — at Initial Version
| Reported by: | Willi Braun | Owned by: | somebody |
|---|---|---|---|
| Priority: | high | Milestone: | 1.9.2 |
| Component: | Frontend | Version: | trunk |
| Keywords: | Cc: | Martin Sjölund |
Description
Following model fail due to using not initialized memory:
ModelicaTest.Fluid.Dissipation.Verifications.HeatTransfer.StraightPipe.kc_overall_KC
It seems that we sort the protected variables in a function wrong or actually we don't sort them at all, if there is an if-expression involved.
loadString("
function f
input Real x;
output Real y;
protected
Real a = sin(x);
Real b = if x > 0 then cos(a+c) else 0;
Real c = cos(a+b);
algorithm
y := c;
end f;
model A
Real x(start=1);
equation
der(x) = f(x);
end A;
"); getErrorString();
simulate(A); getErrorString();
Where is this sorting performed?
Note:
See TracTickets
for help on using tickets.
