[m-rev.] for post-commit review: fix mantis bug 476

Julien Fischer jfischer at opturion.com
Mon Apr 8 13:54:10 AEST 2019


Hi Zoltan,

On Mon, 8 Apr 2019, Zoltan Somogyi wrote:

> For review by Julien, since he reported the original bug.

> Fix a compiler abort caused by name clash between pred and method.
> 
> This fixes Mantis bug 476. The root cause of the compiler abort was the

...


> diff --git a/compiler/add_pred.m b/compiler/add_pred.m
> index 2a30ebf..21054b7 100644
> --- a/compiler/add_pred.m
> +++ b/compiler/add_pred.m
> @@ -34,6 +34,13 @@
>
>  %-----------------------------------------------------------------------------%
> 
> +    % We return MaybePredProcId = yes(...) if and only if the declarations

s/declarations/declaration/

> +    % is a predmode declaration, and we could add both parts (the pred part
> +    % and the mode part) to the HLDS.
> +    %
> +    % If there is no mode part, we could return the pred_id, but we would
> +    % not be able to return a proc_id.
> +    %
>  :- pred module_add_pred_or_func(pred_origin::in, prog_context::in, int::in,
>      maybe(item_mercury_status)::in, pred_status::in, need_qualifier::in,
>      pred_or_func::in, sym_name::in, tvarset::in, inst_varset::in,

Other than the above, it looks fine.

Thanks for looking into that!

Julien.


More information about the reviews mailing list