[m-rev.] error in liveness.m (?)

Peter Wang wangp at students.cs.mu.OZ.AU
Fri Feb 18 14:14:14 AEDT 2005


The compiler is throwing an exception on the following file (derived from
tests/general/unused_arg_determinism.m).  It's not related to my stack_opt.m
change from yesterday.

Sorry if this gets received twice.


/*

% lmc-9 --optimize-saved-vars liveness_erroneous_cond.m
liveness_erroneous_cond.m:015: In `bar':
liveness_erroneous_cond.m:015:   warning: determinism declaration could be
liveness_erroneous_cond.m:015:   tighter.
liveness_erroneous_cond.m:015:   Declared `semidet', inferred `erroneous'.
Uncaught Mercury exception:
Software Error: goal_info_get_post_births: no code_gen_info
Stack dump follows:
   0       pred exception.throw/1-0 (erroneous) (exception.m:361)
   1       pred require.error/1-0 (erroneous) (require.m:110)
   2       pred hlds.hlds_llds.goal_info_get_post_births/2-0 (det) (hlds_llds.m:372)
   3       pred ll_backend.liveness.add_liveness_after_goal/3-0 (det) (liveness.m:1654)
   4       pred ll_backend.liveness.detect_liveness_in_goal_2/6-0 (det) (liveness.m:399)
   5       pred ll_backend.liveness.detect_liveness_in_goal/5-0 (det) (liveness.m:322)
   6       pred ll_backend.liveness.detect_liveness_proc/7-0 (det) (liveness.m:230)
   7       pred ll_backend.stack_opt.stack_opt_cell/8-0 (det) (stack_opt.m:226)
   8       pred top_level.mercury_compile.backend_pass_by_preds_4/12-0 (det) (mercury_compile.m:2663)
   9       pred top_level.mercury_compile.backend_pass_by_preds_3/10-0 (det) (mercury_compile.m:2638)
  10       pred top_level.mercury_compile.backend_pass_by_preds_2/8-0 (det) (mercury_compile.m:2618)
  11       pred top_level.mercury_compile.backend_pass_by_preds/7-0 (det) (mercury_compile.m:2563)
  12       pred top_level.mercury_compile.backend_pass/6-0 (det) (mercury_compile.m:2508)
  13       pred top_level.mercury_compile.mercury_compile_after_front_end/8-0 (det) (mercury_compile.m:1633)
  14       pred top_level.mercury_compile.mercury_compile/6-0 (det) (mercury_compile.m:1474)
  15       pred top_level.mercury_compile.compile/10-0 (det) (mercury_compile.m:1412)
  16       pred list.map_foldl/5-0 (det) (list.m:1587)
  17       pred top_level.mercury_compile.compile_all_submodules/11-0 (det) (mercury_compile.m:1207)
  18       pred top_level.mercury_compile.process_module_2/7-0 (det) (mercury_compile.m:1180)
  19       pred top_level.mercury_compile.process_module/7-0 (det) (mercury_compile.m:1100)
  20       pred top_level.mercury_compile.process_arg_2/7-0 (det) (mercury_compile.m:830)
  21       pred top_level.mercury_compile.process_arg_build/9-0 (det) (mercury_compile.m:808)
  22       pred make.util.build_with_module_options/11-0 (det) (make.util.m:376)
  23       pred make.util.build_with_module_options/10-0 (det) (make.util.m:330)
  24       pred top_level.mercury_compile.process_arg/7-0 (det) (mercury_compile.m:783)
  25       pred top_level.mercury_compile.process_arg_list_2/7-0 (det) (mercury_compile.m:758)
  26       pred top_level.mercury_compile.process_arg_list/7-0 (det) (mercury_compile.m:745)
  27       pred top_level.mercury_compile.process_args/7-0 (det) (mercury_compile.m:700)
  28       pred top_level.mercury_compile.process_all_args/7-0 (det) (mercury_compile.m:508)
  29       pred top_level.mercury_compile.main_2/7-0 (det) (mercury_compile.m:393)
  30       pred top_level.mercury_compile.real_main/2-0 (det) (mercury_compile.m:258)
  31       pred top_level.main/2-0 (det) (top_level.m:48)


On the other hand, this is okay:
% lmc-9 --optimize-saved-vars --no-inlining -C liveness_erroneous_cond.m

*/

:- module liveness_erroneous_cond.
:- interface.
:- pred foo is det.

:- implementation.
:- import_module require.

foo :- ( bar -> true ; true ).

:- pred bar is semidet.
	% If declared as `is erroneous' then the abort doesn't occur.

bar :- error("bar").


--------------------------------------------------------------------------
mercury-reviews mailing list
post:  mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the reviews mailing list