[m-dev.] diff: avoid test case failures with --intermodule-optimization

Simon Taylor stayl at cs.mu.OZ.AU
Mon Mar 5 13:51:16 AEDT 2001


Estimated hours taken: 0.5

tests/invalid/Mmakefile:
tests/warnings/Mmakefile:
	Avoid spurious test case failures when running the tests
	with `--intermodule-optimization'.

Index: invalid/Mmakefile
===================================================================
RCS file: /home/mercury1/repository/tests/invalid/Mmakefile,v
retrieving revision 1.80
diff -u -u -r1.80 Mmakefile
--- invalid/Mmakefile	2001/02/28 12:46:27	1.80
+++ invalid/Mmakefile	2001/03/05 02:48:50
@@ -116,12 +116,18 @@
 #	typeclass_mode_{2,3,4}.m (compiler calls error/1)
 #	cyclic_typeclass.m (compiler goes into an infinite loop)
 
-MCFLAGS-aditi_errors =		--aditi
-MCFLAGS-aditi_state_errors =	--aditi
-MCFLAGS-aditi_update_errors =	--aditi
-MCFLAGS-aditi_update_mode_errors = --aditi
+# Inter-module optimization changes the diagnostics for some
+# tests (in most cases reporting diagnostics when writing the `.opt'
+# file). For those tests, we just disable inter-module optimization.
+
+MCFLAGS-aditi_errors =		--aditi --no-intermodule-optimization
+MCFLAGS-aditi_state_errors =	--aditi --no-intermodule-optimization
+MCFLAGS-aditi_update_errors =	--aditi --no-intermodule-optimization
+MCFLAGS-aditi_update_mode_errors = --aditi --no-intermodule-optimization
 MCFLAGS-any_mode	=	--infer-types
 MCFLAGS-duplicate_modes	=	--verbose-error-messages
+MCFLAGS-exported_mode =		--infer-all --no-intermodule-optimization
+MCFLAGS-imported_mode =		--infer-all --no-intermodule-optimization
 MCFLAGS-missing_det_decls =	--no-infer-det
 MCFLAGS-missing_interface_import = --make-interface
 MCFLAGS-multisoln_func	=	--infer-types
@@ -129,9 +135,10 @@
 MCFLAGS-no_exports = 		--halt-at-warn
 MCFLAGS-sub_c = 		--verbose-error-messages
 MCFLAGS-record_syntax_errors =	--verbose-error-messages
-MCFLAGS-imported_mode =		--infer-all
-MCFLAGS-exported_mode =		--infer-all
+MCFLAGS-test_nested =		--no-intermodule-optimization
 MCFLAGS-typeclass_mode =	--infer-all
+MCFLAGS-undef_mod_qual = 	--no-intermodule-optimization
+MCFLAGS-undef_symbol = 		--no-intermodule-optimization
 
 # The bug is caught when generating dependencies, so it is
 # easiest just to do that step.
Index: warnings/Mmakefile
===================================================================
RCS file: /home/mercury1/repository/tests/warnings/Mmakefile,v
retrieving revision 1.16
diff -u -u -r1.16 Mmakefile
--- warnings/Mmakefile	2000/11/01 06:30:12	1.16
+++ warnings/Mmakefile	2001/03/05 02:18:43
@@ -28,22 +28,26 @@
 
 # some files need to be compiled with special options
 
+	# The warnings for this module are reported twice when
+	# compiling with --intermodule-optimization due to a
+	# performance bug in the handling of assertions
+	# which causes typechecking to be run twice.
+MCFLAGS-ambiguous_overloading	= --no-intermodule-optimization
+
+	# We need to explicitly enable these optimizations because
+	# the arg_order_rearrangement warning doesn't show up at
+	# lower optimization levels.
 MCFLAGS-arg_order_rearrangment	= --introduce-accumulators \
 					--excess-assign --common-struct
-					# we need to explicitly enable those
-					# optimizations because otherwise the
-					# arg_order_rearrangement warning
-					# doesn't show up at lower
-					# optimization levels
 MCFLAGS-duplicate_call		= --warn-duplicate-calls
 MCFLAGS-unused_args_test	= --warn-unused-args
 MCFLAGS-unused_import		= --warn-interface-imports
 MCFLAGS-inference_test		= --infer-all
+
+	# We need to explicitly enable these optimizations because
+	# some of the infinite recursion warnings don't show up at
+	# lower optimization levels.
 MCFLAGS-infinite_recursion	= --excess-assign --common-struct
-					# we need to explicitly enable those
-					# optimizations because some of the
-					# infinite recursion warnings don't
-					# show up at lower optimization levels
 
 #-----------------------------------------------------------------------------#
 
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------



More information about the developers mailing list