#102 Bug in partial evaluation/constant folding

Bug
open-accepted
nobody
Extensions (11)
4
2011-09-22
2008-11-13
Alberto Griggio
No

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...)

Discussion

  •  
    Attachments
  • David Gay
    David Gay
    2009-04-16

    • labels: 738441 --> Extensions
    • priority: 5 --> 4
     
    • status: open --> open-accepted
     
  • Test case added in the regression suite (bug confirmed).