% This is a cut-down version of the program that causes the following % assertion failure in the compiler: % % Software Error: jumpopt.m: Unexpected: adjust_livevals: % BetweenLivevals and PrevLivevals differ % % (This is bug #6 in mantis.) % % To reproduce the bug compile with, -0 --optimize-frames --optimize-repeat=2 % in grade {asm_fast,reg,none}.gc. :- module endo2. :- interface. :- import_module list. :- import_module io. :- type tree ---> l ; br(tree, tree). :- pred write_dnas(list(list(tree))::in, io::di, io::uo) is det. :- implementation. write_dnas(D0, !IO) :- ( dna_head_tail(D0, D) -> write_dnas(D, !IO) ; true ). :- pred dna_head_tail(list(list(tree))::in, list(list(tree))::out) is semidet. dna_head_tail([[] | Fs0], Fs) :- dna_head_tail(Fs0, Fs).