[m-rev.] for review: Fix for semidet in det context abort (Mantis bug #586).

Julien Fischer jfischer at opturion.com
Tue Sep 29 23:36:50 AEST 2026


On Tue, 29 Sept 2026 at 12:45, Peter Wang <novalazy at gmail.com> wrote:
>
> There was a rare interaction between the saved vars const, follow code,
> and simplification passes that led to a "semidet model in det context"
> abort in the low-level code generator. I could only reproduce the
> problem in deep profiling grades with the split-switch-arms pass enabled.
>
> compiler/saved_vars.m:
>     Do not duplicate a goal to construct a Var (where it is assigned a
>     constant value) after a switch on the same Var.
>
> tests/valid/Mercury.options:
> tests/valid/Mmakefile:
> tests/valid/bug586.m:
>     Add test case.

That's fine.

Julien.


More information about the reviews mailing list