Opened 12 years ago

Closed 11 years ago

#2009 closed defect (fixed)

Code generation fails when array of a record is passed to a function

Reported by: cschubert Owned by: sjoelund.se
Priority: normal Milestone: 1.9.0
Component: Code Generation Version: trunk
Keywords: code generation record array function Cc: jfrenkel

Description

Hi,

I have a problem with Code generation when passing arrays of records to a function as in this simple test model:

model RecordArrayInFunction
  record Record
    Real x[4];
  end Record;

  function fun
    input Record u[2];
    output Real y;
  algorithm
    y :=sum(u[1].x) + sum(u[2].x);
  end fun;

  Record r[2](each x = 1:4);
  Real z;

equation
  z = fun(r);
end RecordArrayInFunction;

gcc fails because the type 'RecordArrayInFunction_Record_array' is not defined.

Attachments (2)

RecordArrayInFunction.mo (308 bytes) - added by anonymous 12 years ago.
RecordArrayInFunction.mos (87 bytes) - added by anonymous 12 years ago.

Download all attachments as: .zip

Change History (4)

Changed 12 years ago by anonymous

Changed 12 years ago by anonymous

comment:1 Changed 11 years ago by mahge930

Fixed in r16536.

comment:2 Changed 11 years ago by mahge930

  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.