Opened 14 years ago

Last modified 14 years ago

#1242 closed defect (fixed)

Backend: cref = fnCall() fails for integer arrays in the simulation context

Reported by: Martin Sjölund Owned by: Martin Sjölund
Priority: normal Milestone:
Component: Simulation Code Generation Version: 1.6.0
Keywords: Cc: Martin Sjölund,

Description

Compilation succeeds due to real_array and integer_array both being the same type (base_array), but the results are wrong (copying from int* to double* without type casting, etc).
Mostly bad because the wrong results are produced instead of an error message. Would be easier to fix this than creating good error messages though.

{{{model A

function arrcalli
input Real r;
output Integer[3] rs;
algorithm
rs := {integer(r),2*integer(r),3*integer(r)};
end arrcalli;

Integer[3] i;
equation
i = arrcalli(time);
end A;}}}

Change History (1)

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

Fixed in r5943

Note: See TracTickets for help on using tickets.