There is a bug in the partial evaluation/constant folding transformation.
In the attached example, the "if" is simplified to the "else" branch, instead of the "then" branch
CIL version 1.3.6, with the following command line:
cilly.asm.exe --domakeCFG --dopartial --noPrintLn --partial_no_global_const
If you comment out line 13 (global = 0 in main), then the "if" is not simplified at all (so the program is still correct...)
Test case added in the regression suite (bug confirmed).