﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
3134	Compilation failure for functions returning two dimensional arrays	crupp@…	Mahder Alemseged Gebremedhin	"The following model fails at compile time using r24377. It works using r23420. It seems to be caused by functions returning multidimensional arrays.
{{{
loadString(""
model arrayFuncBug
  parameter Real a = 1;
  Real arr[3, 3];
equation
  arr = func(a = a);
end arrayFuncBug;

function func
  input Real a = 0.01;
  output Real arr[3, 3];
algorithm
  arr := diagonal({a ^ 2, a ^ 3, a ^ 4});
end func;
"");

buildModel(arrayFuncBug);
}}}

The log file contains:
{{{
arrayFuncBug_functions.c: In function 'omc_func':
arrayFuncBug_functions.c:24: error: incompatible type for argument 3 of 'array_alloc_real_array'
C:/OpenModelica1.9.2Nightly//include/omc/c/util/real_array.h:144: note: expected 'real_array_t' but argument is of type 'modelica_real'
arrayFuncBug_functions.c:26: error: incompatible type for argument 3 of 'array_alloc_real_array'
C:/OpenModelica1.9.2Nightly//include/omc/c/util/real_array.h:144: note: expected 'real_array_t' but argument is of type 'double'
arrayFuncBug_functions.c:29: error: incompatible type for argument 3 of 'array_alloc_real_array'
C:/OpenModelica1.9.2Nightly//include/omc/c/util/real_array.h:144: note: expected 'real_array_t' but argument is of type 'double'
}}}"	defect	closed	high	1.9.4	Code Generation	trunk	fixed		Mahder Alemseged Gebremedhin
