Opened 6 years ago

Closed 6 years ago

#3276 closed defect (fixed)

pre() of continuous var in when

Reported by: Jesper Mattsson Owned by: Jonathan Kämpe
Priority: major Milestone: 1.12.x
Component: CodeGen/C Version: trunk
Keywords: Cc:

Description

Compiling a model that uses pre() of a continuous variable in a when clause causes crash during C code compilation.

model Test
    Real x = if time >= 2 then time else 1;
    Real y;
    Real z(start=0);
equation
    der(y) = x;
    when time >= 2 then
        z = pre(x);
    end when;
end Test;

Change History (3)

comment:1 Changed 6 years ago by Jonathan Kämpe

Owner: changed from Jesper Mattsson to Jonathan Kämpe
Status: newassigned

comment:2 Changed 6 years ago by Jonathan Kämpe

Fixed in r5601.

comment:3 Changed 6 years ago by Jonathan Kämpe

Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.