% mmc -s asm_fast.gc.profdeep -O3 -C ssa_cutdown % % Uncaught Mercury exception: % Software Error: predicate `ll_backend.code_gen.generate_goal'/7: Unexpected: semidet model in det context % % The exception goes away with --no-split-switch-arms. :- module ssa_cutdown. :- interface. :- type parent ---> parent( align :: align ). :- type unresolved_spec ---> initial ; inherit ; value(spec_align). :- type spec_align ---> computed(align) ; auto. :- type align ---> start ; end. :- func get_computed_align(unresolved_spec, parent) = align. %--------------------------------------------------------------------% :- implementation. get_computed_align(Spec, Parent) = Val :- ( Spec = inherit, Val = start ; ( Spec = initial, Val0 = auto ; Spec = value(Val0) ), ParentVal = Parent ^ align, ( Val0 = auto, Val = ParentVal ; Val0 = computed(Val) ) ). %--------------------------------------------------------------------%