Commit Graph

1 Commits

Author SHA1 Message Date
Zoltan Somogyi
779e1ce54a Require only pulled-out functors' args to be non-unique.
This fixes the general case of Mantis bug 480.

compiler/cse_detection.m:
    When deciding whether we want to pull common X = f(...) unifications
    out of branched control structures, require only f'a args to be nonunique,
    not the args of any other functors that X may be bound to.

compiler/switch_detection.m:
    Obey the restrictions that cse_detection.m may impose.

tests/valid/bug480a.m:
    A new test case for this bug fix.

tests/valid/Mmakefile:
    Enable the new test case.
2019-08-07 14:59:40 +02:00