Files
mercury/tests/stm/atomic_mvar.exp
Peter Wang 0939570346 Fix a problem when one or more of the goals in an atomic scope does not mention
Branches: main

Fix a problem when one or more of the goals in an atomic scope does not mention
the inner state variable.  The other goals would have bogus unifications added
to them, where the non-final version of the state variable would be used
(a mode error as those variables are clobbered).

compiler/state_var.m:
	In svar_start_inner_atomic_scope, call
	new_dot_state_var/new_colon_state_var instead of new_local_state_var
	which calls new_final_state_var.  new_final_state_var produces names
	which cannot be compared by compare_svar_names, which is used by
	svar_finish_disjunction to tell which variable is higher numbered.

	Add a sanity check.

tests/stm/Mmakefile:
tests/stm/atomic_mvar.exp:
tests/stm/atomic_mvar.m:
	Add a test case.
2009-11-10 03:03:05 +00:00

2 lines
3 B
Plaintext