[m-rev.] Compiler issue: did you get my previous email?

Zoltan Somogyi zoltan.somogyi at runbox.com
Sun Dec 19 18:23:45 AEDT 2021


2021-12-19 12:18 GMT+11:00 "Zoltan Somogyi" <zoltan.somogyi at runbox.com>:
> I will look into fixing both halves of this, but for now, just try
> turning off intermodule optimization.

The problem turned out to be the compiler not being prepared
for an unexpected situation: a .opt file containing references to undeclared
modes of declared predicates. I have just committed a fix, after which
the compiler won't crash in the same circumstances. This should be
in the next ROTD.

However, the reason why this bug was tickled was the fact that
one of your modules, pprint.m, has the same name as a standard
Mercury library module. When trying to make e.g. aio.c, the compiler
read in the .int file of your pprint.m, but the .opt file of the standard
library module. The .opt file makes sense only with ITS OWN .int file.
We should fix the fact that such mismatches are possible, but until then,
give your pprint module some other name. (Note: the name pretty_printer
is also already taken.)

Zoltan.


More information about the reviews mailing list