[m-dev.] stage 2 broken with --intermod-opt and -O5

Julien Fischer jfischer at opturion.com
Thu Jul 23 15:30:03 AEST 2026


On Thu, 23 Jul 2026 at 09:06, Zoltan Somogyi <zoltan.somogyi at runbox.com> wrote:
>
>
>
> On Thu, 23 Jul 2026 00:26:11 +1000, Julien Fischer <jfischer at opturion.com> wrote:
>
> > Bootchecking in asm_fast.gc with --intermod-opt and -O5 is broken
> > on testing.mercurylang.  Bootchecking on my machine yields the following
> > during stage 2 compilation
> >
> > gmake[1]: *** [/tmp/mmake.X8Q1BL:572631:
> > hlds.make_hlds.make_hlds_passes.c_date] Error 1
> > gmake[1]: *** Waiting for unfinished jobs....
> > ...
> > Uncaught Mercury exception:
> > Software Error: map.lookup: key not found
> >         Key Type: term.var(parse_tree.prog_data.prog_var_type)
> >         Key Value: var(12)
> >         Value Type: ll_backend.var_locn.var_state
> > Stack dump not available in this grade.
> >
> > The last ROTD that worked appears to be rotd-2026-07-13.
>

...

> I would guess that disabling deforestation just for make_hlds_passes.m
> would work around this bug.

Unfortunately not. The module also fails to compile with -O2 --intermod-opt.
Turning off intermodule optimization or inlining is required to get
it to compile in asm_fast.gc.

Julien.


More information about the developers mailing list