Files
mercury/tests/hard_coded/solver_build_call.exp
Ralph Becket 9bca1df24b Mode analysis was aborting in a program where it was inserting a new
Estimated hours taken: 13
Branches: main

Mode analysis was aborting in a program where it was inserting a new
variable for an implied mode unification, but the new variable id
already had a (non-free) mapping in the instmap, which led to a
compiler abort (it thought it was about to enter an infinite loop).

This problem was introduced when Mark changed modes.build_call with
his recent fixes for polymorphism.  modes.build_call extracts the
module_info from the mode_info, then the proc_info for the current
proc from the module_info.  However, at this point the proc_info has
out-of-date varset and vartypes fields, because mode analysis can
introduce temporary variables for implied mode unifications.

compiler/modes.m:
	Ensure that modes.build_call first takes the current varset and
	vartypes fields from the mode_info and used them to update the
	current proc_info before using it to construct an initialisation
	call.

tests/hard_coded/Mmakefile:
tests/hard_coded/solver_build_call.m:
tests/hard_coded/solver_build_call.exp:
	Added a test case.
2005-10-26 03:04:25 +00:00

2 lines
19 B
Plaintext