Opened 11 years ago

Closed 10 years ago

#2535 closed defect (fixed)

Array Initialziation in Function Fails

Reported by: ravi Owned by: somebody
Priority: normal Milestone: 1.9.2
Component: Run-time Version: trunk
Keywords: function, array, initialization Cc:

Description (last modified by Willi Braun)

The following model lead to a segmentation fault

function myfun
  input Real x;
  output Real y;
  protected Real  z[3]= {1,2,3} ;  // This Falis (why ??)
  //protected  Real  z[3] ;           // Works 
algorithm
  z[1] := x ;
  y    := 2 * z[1] ;
end myfun;

model tryme
  Real y;
equation
   y = myfun(3.4) * y + 2 ; 
end tryme;

Change History (3)

comment:1 by Willi Braun, 11 years ago

Description: modified (diff)

comment:2 by Martin Sjölund, 10 years ago

Milestone: 1.9.11.9.2

This ticket was not closed for 1.9.1, which has now been released. It was batch modified for milestone 1.9.2 (but maybe an empty milestone was more appropriate; feel free to change it).

comment:3 by Lennart Ochel, 10 years ago

Resolution: fixed
Status: newclosed

This is already fixed.

Note: See TracTickets for help on using tickets.