Ticket #3910: testStrangeCSE.mos

File testStrangeCSE.mos, 589 bytes (added by Francesco Casella, 10 years ago)

.mos file to reproduce the problem

Line 
1loadString("
2package CSE
3
4 model Test1
5 Real x;
6 Real y;
7 Real z;
8 Real w(fixed = true);
9 equation
10 der(w) = 1 - w;
11 x = 3*sin(w);
12 y = 3*sin(w);
13 z = 6*sin(w)-1;
14 end Test1;
15
16 model Test2
17 Real x(fixed = true);
18 Real y;
19 Real z;
20 equation
21 der(x) = 1 - x;
22 y = sin(x);
23 z = 2*sin(x);
24 end Test2;
25end CSE;
26"); getErrorString();
27
28setDebugFlags("dumpCSE"); getErrorString();
29setCommandLineOptions("--postOptModules+=wrapFunctionCalls"); getErrorString();
30simulate(CSE.Test1); getErrorString();
31simulate(CSE.Test2); getErrorString();