﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
3910	Very strange behaviour of CSE	Francesco Casella	Patrick Täuber	"Consider the following package:
{{{
  model Test1
    Real x;
    Real y;
    Real z;
    Real w(fixed = true);
  equation
    der(w) = 1 - w;
    x = 3*sin(w);
    y = 3*sin(w);
    z = 6*sin(w)-1;
   end Test1;

  model Test2
     Real x(fixed = true);
     Real y;
     Real z;
   equation
     der(x) =  1 - x;
     y = sin(x);
     z = 2*sin(x);
   end Test2;
end CSE;
}}}

and execute the following script:
{{{
setDebugFlags(""dumpCSE""); getErrorString();
setCommandLineOptions(""--postOptModules+=wrapFunctionCalls""); getErrorString();
simulate(CSE.Test1); getErrorString();
simulate(CSE.Test2); getErrorString();
}}}

In the first test case, the CSE is performed correctly and the term {{{sin(w)}}} is only computed once. In the second one, instead, no CSE is performed at all.

I am unable to understand what is the structural difference between the two test cases."	defect	closed	critical		Backend		fixed		jan.hagemann@…
