﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
3557	PreOptModules messes up model	Martin Sjölund	Lennart Ochel	"The following model passes the frontend, but some preOptModule messes up the structure very badly:
{{{#!mo
model M
  record R
    String name ""Unique name used as identifier"";
    Real c ""Coefficient"";
  end R;
  function name
    input R r;
    output String n=r.name;
  end name;
  R[3] dictionary = {R(name=""A"", c=1), R(name=""B"", c=2), R(name=""C"", c=3)} ""Data dictionary"";
  Boolean[:] b = {name(r) == ""B"" for r in dictionary};
  Integer i = Modelica.Math.BooleanVectors.firstTrueIndex(b);
  Real c = dictionary[i].c ""Coefficient"";
  annotation(uses(Modelica(version=""3.2.1"")));
end M;
}}}

{{{
Error: Model is structurally singular, error found sorting equations 
 3: 3.0 = 3.0;
4: ""A"" = false;
5: ""B"" = false;
6: ""C"" = false;
 for variables 
 dictionary[1].c(8), b[3](3), b[2](4), b[1](5), dictionary[3].c(6)
}}}"	defect	closed	high	1.16.0	Backend		fixed		Lennart Ochel Willi Braun
