Ticket #3910: testStrangeCSE.mos
| File testStrangeCSE.mos, 589 bytes (added by , 10 years ago) |
|---|
| Line | |
|---|---|
| 1 | loadString(" |
| 2 | package 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; |
| 25 | end CSE; |
| 26 | "); getErrorString(); |
| 27 | |
| 28 | setDebugFlags("dumpCSE"); getErrorString(); |
| 29 | setCommandLineOptions("--postOptModules+=wrapFunctionCalls"); getErrorString(); |
| 30 | simulate(CSE.Test1); getErrorString(); |
| 31 | simulate(CSE.Test2); getErrorString(); |
