[m-rev.] diff: fix detism bug
Zoltan Somogyi
zs at cs.mu.OZ.AU
Thu Apr 8 14:24:11 AEST 2004
compiler/det_analysis.m:
Fix a bug in my cleanup of this module that was detected by a debug
grade bootcheck (the non-debug grade bootcheck succeeded).
tests/hard_coded/cc_and_non_cc_test.m:
Document that this test case (the one that detected the bug) should
be compiled with --no-inlining, to enable the detection of such bugs
in all grades, not just those that turn off inlining.
tests/hard_coded/Mercury.options:
Specify --no-inlining for cc_and_non_cc_test.
Zoltan.
Index: compiler/det_analysis.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/det_analysis.m,v
retrieving revision 1.165
diff -u -b -r1.165 det_analysis.m
--- compiler/det_analysis.m 5 Apr 2004 05:06:46 -0000 1.165
+++ compiler/det_analysis.m 7 Apr 2004 21:49:47 -0000
@@ -932,7 +932,7 @@
modes_are_identical_bar_cc(!.ProcId, TestProcId, PredInfo,
ModuleInfo)
->
- true
+ !:ProcId = TestProcId
;
det_find_matching_non_cc_mode_2(Rest, ModuleInfo, PredInfo,
!ProcId)
cvs diff: Diffing tests/hard_coded
Index: tests/hard_coded/Mercury.options
===================================================================
RCS file: /home/mercury/mercury1/repository/tests/hard_coded/Mercury.options,v
retrieving revision 1.10
diff -u -b -r1.10 Mercury.options
--- tests/hard_coded/Mercury.options 12 Feb 2004 01:52:06 -0000 1.10
+++ tests/hard_coded/Mercury.options 8 Apr 2004 03:50:24 -0000
@@ -1,6 +1,7 @@
MCFLAGS-allow_stubs = --allow-stubs --no-warn-stubs --infer-all
MCFLAGS-checked_nondet_tailcall = --checked-nondet-tailcalls
MCFLAGS-bigtest = --intermodule-optimization -O3
+MCFLAGS-cc_and_non_cc_test = --no-inlining
MCFLAGS-constraint = --constraint-propagation --enable-termination
MCFLAGS-constraint_order = --constraint-propagation --enable-termination
MCFLAGS-deforest_cc_bug = --deforestation
Index: tests/hard_coded/cc_and_non_cc_test.m
===================================================================
RCS file: /home/mercury/mercury1/repository/tests/hard_coded/cc_and_non_cc_test.m,v
retrieving revision 1.1
diff -u -b -r1.1 cc_and_non_cc_test.m
--- tests/hard_coded/cc_and_non_cc_test.m 30 May 1998 15:23:14 -0000 1.1
+++ tests/hard_coded/cc_and_non_cc_test.m 7 Apr 2004 21:52:46 -0000
@@ -1,3 +1,7 @@
+% This test should be compiled with --no-inlining. If inlining is enabled,
+% the tests 42=43 and 43=43 will be evaluated at compile time, masking any
+% bugs in the selection of which modes of p and q to call.
+
:- module cc_and_non_cc_test.
:- interface.
:- import_module io.
cvs diff: Diffing tests/hard_coded/exceptions
cvs diff: Diffing tests/hard_coded/purity
cvs diff: Diffing tests/hard_coded/sub-modules
cvs diff: Diffing tests/hard_coded/typeclasses
--------------------------------------------------------------------------
mercury-reviews mailing list
post: mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------
More information about the reviews
mailing list