﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
2276	detecting size mismatch for output arguments  in functions	Willi Braun	somebody	"Following model runs into an segmentation fault, since we set the unknown size to 99.
{{{
model test1
  function f1
    input Real u;
    output Real y[:];
  algorithm
    for i in 1:5 loop
      y[i] := i+u;
    end for;
  end f1;
  Real z[5];
equation
  z = f1(time);
end test1;
}}}

But it should end up with an flatting error like the constant case.
{{{
model test1
  function f1
    output Real y[:]; // unknown size
  algorithm
    for i in 1:5 loop
      y[i] := i;
    end for;
  end f1;
  Real z[5];
equation
  z = f1();
end test1;
}}}
{{{
[<interactive>:50:3-50:11:writable] Error: Array equation has unknown size in {z[1], z[2], z[3], z[4], z[5]}={1.0, 2.0, 3.0, 4.0, 5.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0}.
[<interactive>:50:3-50:11:writable] Error: Type mismatch in equation {z[1], z[2], z[3], z[4], z[5]}={1.0, 2.0, 3.0, 4.0, 5.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0} of type Real[5]=Real[:].
Error: Error occurred while flattening model test1
}}}
"	defect	reopened	normal	2.1.0	New Instantiation	trunk			Per Östlund
