[m-rev.] Re: Bug in tabling?
Zoltan Somogyi
zs at csse.unimelb.edu.au
Fri Aug 18 13:31:05 AEST 2006
On 18-Aug-2006, Ralph Becket <rafe at csse.unimelb.edu.au> wrote:
> I came across the following bug on swordfish when compiling a BDD test
> module:
>
> mmc --make test_bdd
> Making Mercury/asm_fast.gc.tr/i686-pc-linux-gnu/Mercury/cs/bdd.c
> Making Mercury/asm_fast.gc.tr/i686-pc-linux-gnu/Mercury/cs/test_bdd.c
> Making Mercury/asm_fast.gc.tr/i686-pc-linux-gnu/Mercury/os/bdd.o
> Mercury/asm_fast.gc.tr/i686-pc-linux-gnu/Mercury/cs/bdd.c:3464: macro
> `MR_tbl_memo_mark_as_succeeded' used with just one arg
> Mercury/asm_fast.gc.tr/i686-pc-linux-gnu/Mercury/cs/bdd.c:3538: macro
> `MR_tbl_memo_mark_as_succeeded' used with just one arg
> Mercury/asm_fast.gc.tr/i686-pc-linux-gnu/Mercury/cs/bdd.c:3597: macro
> `MR_tbl_memo_mark_as_succeeded' used with just one arg
> Mercury/asm_fast.gc.tr/i686-pc-linux-gnu/Mercury/cs/bdd.c:3641: macro
> `MR_tbl_memo_mark_as_succeeded' used with just one arg
> Mercury/asm_fast.gc.tr/i686-pc-linux-gnu/Mercury/cs/bdd.c:3673: macro
> `MR_tbl_memo_mark_as_succeeded' used with just one arg
> Mercury/asm_fast.gc.tr/i686-pc-linux-gnu/Mercury/cs/bdd.c:3714: macro
> `MR_tbl_memo_mark_as_succeeded' used with just one arg
> ** Error making
> `Mercury/asm_fast.gc.tr/i686-pc-linux-gnu/Mercury/os/bdd.o'.
> make: *** [test_bdd] Error 1
I have committed this fix. Ralph, can you please cut down your program and add
it as a test case to tests/tabling?
Zoltan.
compiler/table_gen.m:
Fix a bug that lead to a malformed macro invocation in the generated C
code.
cvs diff: Diffing .
Index: table_gen.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/table_gen.m,v
retrieving revision 1.115
diff -u -b -r1.115 table_gen.m
--- table_gen.m 11 Aug 2006 04:17:16 -0000 1.115
+++ table_gen.m 18 Aug 2006 03:20:05 -0000
@@ -2419,10 +2419,11 @@
ModuleInfo, Context, SaveGoal),
Goals = SavePrefixGoals ++ [SaveGoal]
;
+ DebugArgStr = get_debug_arg_string(!.TableInfo),
MarkAsSucceededPredName = "table_memo_mark_as_succeeded",
MarkAsSucceededMacroName = "MR_tbl_memo_mark_as_succeeded",
MarkAsSucceededCode = MarkAsSucceededMacroName ++
- "(" ++ cur_table_node_name ++ ");",
+ "(" ++ DebugArgStr ++ ", " ++ cur_table_node_name ++ ");",
table_generate_foreign_proc(MarkAsSucceededPredName, detism_det,
tabling_c_attributes, [TableArg], [],
MarkAsSucceededCode, purity_impure, [],
cvs diff: Diffing notes
--------------------------------------------------------------------------
mercury-reviews mailing list
Post messages to: mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions: mercury-reviews-request at csse.unimelb.edu.au
--------------------------------------------------------------------------
More information about the reviews
mailing list