Opened 11 years ago

Last modified 10 years ago

#2535 closed defect

Array Initialziation in Function Fails — at Version 1

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 (1)

comment:1 by Willi Braun, 11 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.