tests/spec/unit/compilation/optimize_unify.mzn
raw| 1 | /*** |
| 2 | !Test |
| 3 | solvers: [gecode] |
| 4 | options: |
| 5 | -O2: true |
| 6 | expected: !Result |
| 7 | solution: !Solution |
| 8 | x: false |
| 9 | z: 0 |
| 10 | obj: 0 |
| 11 | ***/ |
| 12 | |
| 13 | var bool: x; |
| 14 | var int: y = sum(s in 1..1 where x) (1); |
| 15 | var int: z; |
| 16 | z = y; |
| 17 | var int: obj :: output = if <> == true then 0 else z endif; |
| 18 | solve minimize obj; |