[m-rev.] diff: fix mantis bug 368

Zoltan Somogyi zoltan.somogyi at runbox.com
Fri Feb 6 22:15:22 AEDT 2015



On Fri, 06 Feb 2015 17:12:11 +1100 (EST), "Zoltan Somogyi" <zoltan.somogyi at runbox.com> wrote:
> It seems in both grades the reset clause is added twice,
> but with different variable names :-(, and thus probably
> in two different places in the compiler. This means my recent
> diff probably stepped on an earlier workaround.

The problem wasn't a workaround, but this comma vs period bug:

diff --git a/compiler/ctgc.selector.m b/compiler/ctgc.selector.m
index c4ab16f..b70a30e 100644
--- a/compiler/ctgc.selector.m
+++ b/compiler/ctgc.selector.m
@@ -524,7 +524,7 @@ branch_map_search([Type - Sel | TypeSels], KeyType, ValueSel):-

 reset_tables(!IO) :-
     table_reset_for_type_contains_subtype_1_4(!IO),
-    table_reset_for_type_arg_types_3(!IO).
+    table_reset_for_type_arg_types_3(!IO),
     table_reset_for_normalize_selector_with_type_information_4(!IO).

The last line was a clause defining the aux predicate that is now defined
automatically by add_mutable_aux_preds.m. For C, it defines the predicate
using a foreign_proc, which overrides the clause. For the other backends,
the automatically generated clause had this stray clause added to it,
leading to the error.

I am committing the fix.

Zoltan.



More information about the reviews mailing list