diff for review - bug fix
Simon TAYLOR
stayl at students.cs.mu.oz.au
Sat Feb 15 18:11:58 AEDT 1997
Hi Fergus,
Here's a bug fix for review.
Simon
Estimated hours taken: 1
Fixed a bug reported by David Overton which caused an abort in the
second pass of simplification.
compiler/dead_proc_elim.m
Remove unused pseudo_imported unification preds
(they can be inlined away).
compiler/hlds_out.m
Invert the test for printing pseudo_imported unification preds
in hlds_dumps.
tests/valid/Mmake
tests/valid/compl_unify_bug.m
Add a regression test.
Index: dead_proc_elim.m
===================================================================
RCS file: /home/staff/zs/imp/mercury/compiler/dead_proc_elim.m,v
retrieving revision 1.22
diff -u -r1.22 dead_proc_elim.m
--- dead_proc_elim.m 1997/02/14 05:53:56 1.22
+++ dead_proc_elim.m 1997/02/15 04:33:27
@@ -448,6 +448,7 @@
% If yes, find out also whether any of its procedures
% must be kept.
( Status = local, Keep = no
+ ; Status = pseudo_imported, Keep = no
; Status = pseudo_exported, Keep = yes(0)
)
->
Index: hlds_out.m
===================================================================
RCS file: /home/staff/zs/imp/mercury/compiler/hlds_out.m,v
retrieving revision 1.155
diff -u -r1.155 hlds_out.m
--- hlds_out.m 1997/01/27 07:45:09 1.155
+++ hlds_out.m 1997/02/15 03:30:24
@@ -402,7 +402,7 @@
% mode for them
{ pred_info_is_pseudo_imported(PredInfo) },
{ pred_info_procids(PredInfo, ProcIds) },
- { ProcIds \= [0] }
+ { ProcIds = [0] }
->
[]
;
Index: tests/valid/Mmake
===================================================================
RCS file: /home/staff/zs/imp/tests/valid/Mmake,v
retrieving revision 1.25
diff -u -r1.25 Mmake
--- Mmake 1997/02/10 04:06:06 1.25
+++ Mmake 1997/02/15 06:39:42
@@ -8,6 +8,7 @@
SOURCES= \
complicated_unify.m \
+ compl_unify_bug.m \
constructor_arg_names.m \
dcg_test.m \
det_condition.m \
@@ -76,6 +77,10 @@
simplify_bug.c: simplify_bug.m
$(MCG) --grade $(GRADE) $(MCGFLAGS) -O-1 \
simplify_bug.m > simplify_bug.err 2>&1
+
+compl_unify_bug.c: compl_unify_bug.m
+ $(MCG) --grade $(GRADE) $(MCGFLAGS) -O3 \
+ compl_unify_bug.m > compl_unify_bug.err 2>&1
vn_float.c: vn_float.m
$(MCG) --grade $(GRADE) $(MCGFLAGS) -O5 vn_float.m > vn_float.err 2>&1
tests/valid/compl_unify_bug.m
-------------------------------------------------------------------------------
% This is a regression test for a bug in dead procedure elimination
% of pseudo-imported preds.
:- module compl_unify_bug.
:- interface.
:- pred bug(int::in, list(T)::in) is semidet.
:- implementation.
:- import_module list.
bug(NextInputArgNum, InputArgs) :-
list__drop(NextInputArgNum, InputArgs, [_|_]).
More information about the developers
mailing list