Opened 10 years ago

Closed 9 years ago

#3367 closed defect (fixed)

Unknown dimensions as function output generates bad code

Reported by: Martin Sjölund Owned by: Martin Sjölund
Priority: high Milestone: 1.9.3
Component: Code Generation Version: trunk
Keywords: Cc: Per Östlund, Mahder Alemseged Gebremedhin, Willi Braun

Description

Unknown dimensions as function output generates bad code. The problem is that we need to send in the array which we want to assign to. And this array might be an array with unknown dimensions. If it is, we should allocate and copy data. If it is an array of fixed dimensions, we should assert that the two dimensions are equal (but not abort the program as we currently do, crashing OMC). The function assigning the data does not know which case it is (might be 2 in the function and : in the caller, or : in the function and 2 in the caller).

Attachments (1)

UnknownDimensionFunctionCall.mo (3.9 KB ) - added by Martin Sjölund 10 years ago.

Download all attachments as: .zip

Change History (4)

by Martin Sjölund, 10 years ago

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

Cc: Per Östlund Mahder Alemseged Gebremedhin Willi Braun added

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

Owner: changed from Lennart Ochel to Martin Sjölund
Status: newaccepted

comment:3 by Martin Sjölund, 9 years ago

Milestone: Future1.9.3
Resolution: fixed
Status: acceptedclosed
Note: See TracTickets for help on using tickets.