Commit Graph

2 Commits

Author SHA1 Message Date
Zoltan Somogyi
601faa5765 Fix missing word in comment. 2018-02-22 14:02:26 +11:00
Zoltan Somogyi
54ea0dbffc Fix a problem in switch code generation.
This problem is the cause of Mantis bug #452.

compiler/switch_util.m:
    Don't require a bit vector check for cannot_fail switches,
    even in cases where the switch arms do not completely cover
    the range of possible values in the switched-on variable's type;
    if the switch is cannot_fail, then the switch variable cannot have
    any of the "missing" values when the switch is entered.

tests/hard_coded/bug452.{m,exp}:
    A regression test for the bug.

tests/hard_coded/Mmakefile:
    Enable the new test case.
2018-02-22 13:33:05 +11:00