Mercury Bugs - mercury | |||||
View Issue Details | |||||
ID | Project | Category | View Status | Date Submitted | Last Update |
0000527 | mercury | Bug | public | 2021-01-27 13:00 | 2021-01-27 13:00 |
Reporter | wangp | ||||
---|---|---|---|---|---|
Assigned To | |||||
Priority | normal | Severity | minor | Reproducibility | always |
Status | new | Resolution | open | ||
Platform | OS | OS Version | |||
Product Version | |||||
Target Version | Fixed in Version | ||||
Summary | 0000527: daio pass and inlining | ||||
Description | The compiler aborts on gh72.m test during the inlining pass, with intermodule optimisation turned OFF. % mmc -s asm_fast.gc -O5 --no-intermod-opt gh72.m Uncaught Mercury exception: Software Error: predicate `hlds.instmap.merge_instmapping_delta_vars'/9: Unexpected: error merging var 5 Stack dump follows: 0 pred exception.throw/1-0 (erroneous) (exception.m:310) 1 pred require.error/1-0 (erroneous) (require.m:172) 2 pred require.unexpected/2-0 (erroneous) (require.m:203) 3 2* pred hlds.instmap.merge_instmapping_delta_vars/9-0 (det) (instmap.m:1334 and others) 5 pred hlds.instmap.merge_instmapping_delta/8-0 (det) (instmap.m:1290) 6 pred hlds.instmap.merge_instmap_delta/8-0 (det) (instmap.m:1271) 7 pred hlds.instmap.merge_instmap_deltas_2/8-0 (det) (instmap.m:1376) 8 pred hlds.instmap.merge_instmap_deltas/7-0 (det) (instmap.m:1345) 9 pred check_hlds.mode_util.recompute_instmap_delta_disj/9-0 (det) (mode_util.m:1602) 10 pred check_hlds.mode_util.recompute_instmap_delta_1/8-0 (det) (mode_util.m:1391) 11 pred check_hlds.mode_util.recompute_instmap_delta_conj/8-0 (det) (mode_util.m:1577) 12 pred check_hlds.mode_util.recompute_instmap_delta_1/8-0 (det) (mode_util.m:1379) 13 pred check_hlds.mode_util.recompute_instmap_delta/8-0 (det) (mode_util.m:1353) 14 pred check_hlds.mode_util.recompute_instmap_delta_proc/5-0 (det) (mode_util.m:1346) 15 pred transform_hlds.inlining.inline_in_proc/6-0 (det) (inlining.m:706) 16 pred transform_hlds.inlining.inline_in_scc/6-0 (det) (inlining.m:298) 17 10* pred transform_hlds.inlining.inline_in_sccs/5-0 (det) (inlining.m:282 and others) 27 pred transform_hlds.inlining.inline_in_module/2-0 (det) (inlining.m:269) 28 pred top_level.mercury_compile_middle_passes.maybe_do_inlining/6-0 (det) (mercury_compile_middle_passes.m:977) 29 pred top_level.mercury_compile_middle_passes.middle_pass/8-0 (det) (mercury_compile_middle_passes.m:212) 30 pred top_level.mercury_compile_main.after_front_end_passes/13-0 (det) (mercury_compile_main.m:2416) 31 pred top_level.mercury_compile_main.process_augmented_module/14-0 (det) (mercury_compile_main.m:1793) 32 pred top_level.mercury_compile_main.augment_and_process_module/15-0 (det) (mercury_compile_main.m:1687) 33 pred list.map_foldl3/9-0 (det) (list.m:3335) 34 pred top_level.mercury_compile_main.augment_and_process_all_submodules/15-0 (det) (mercury_compile_main.m:1627) 35 pred top_level.mercury_compile_main.read_augment_and_process_module/11-0 (det) (mercury_compile_main.m:1447) 36 pred top_level.mercury_compile_main.do_process_compiler_arg/10-0 (det) (mercury_compile_main.m:1207) 37 pred top_level.mercury_compile_main.process_compiler_arg_build/11-0 (det) (mercury_compile_main.m:1091) 38 pred make.build.build_with_module_options_args_invoked/13-0 (det) (make.build.m:234) 39 pred make.build.build_with_module_options_args/12-0 (det) (make.build.m:185) 40 pred top_level.mercury_compile_main.process_compiler_arg/12-0 (det) (mercury_compile_main.m:1052) 41 pred top_level.mercury_compile_main.process_compiler_cmd_line_args/14-0 (det) (mercury_compile_main.m:1010) 42 pred top_level.mercury_compile_main.do_op_mode_args/11-0 (det) (mercury_compile_main.m:845) 43 pred top_level.mercury_compile_main.do_op_mode/10-0 (det) (mercury_compile_main.m:710) 44 pred top_level.mercury_compile_main.main_after_setup/7-0 (det) (mercury_compile_main.m:672) 45 pred top_level.mercury_compile_main.real_main_after_expansion/3-0 (det) (mercury_compile_main.m:443) 46 pred top_level.mercury_compile_main.real_main/2-0 (det) (mercury_compile_main.m:137) 47 pred mercury_compile.main/2-0 (det) (mercury_compile.m:32) The problem occurs when doing inlining in the predicate gh72.direct_arg_in_out_0_disj_init/3. It tries to merge the insts of a variable between two disjuncts: InstA bound(clobbered, inst_test_no_results, [bound_functor(cons(qualified(unqualified("gh72"), "f1"), 1, type_ctor(qualified(unqualified("gh72"), "t"), 0)), [ground(clobbered, none_or_default_func)]), bound_functor(cons(qualified(unqualified("gh72"), "f2"), 1, type_ctor(qualified(unqualified("gh72"), "t"), 0)), [ground(clobbered, none_or_default_func)]), bound_functor(cons(qualified(unqualified("gh72"), "f3"), 1, type_ctor(qualified(unqualified("gh72"), "t"), 0)), [ground(clobbered, none_or_default_func)]), bound_functor(cons(qualified(unqualified("gh72"), "f4"), 1, type_ctor(qualified(unqualified("gh72"), "t"), 0)), [ground(clobbered, none_or_default_func)])]) InstB bound(clobbered, inst_test_no_results, [bound_functor(cons(qualified(unqualified("gh72"), "f1"), 1, type_ctor(qualified(unqualified("gh72"), "t"), 0)), [free]), bound_functor(cons(qualified(unqualified("gh72"), "f2"), 1, type_ctor(qualified(unqualified("gh72"), "t"), 0)), [bound(clobbered, inst_test_no_results, [bound_functor(cons(qualified(unqualified("gh72"), "package"), 2, type_ctor(unqualified(""), -1)), [bound(clobbered, inst_test_no_results, [bound_functor(string_const("fill2"), [])]), ground(clobbered, none_or_default_func)])])]), bound_functor(cons(qualified(unqualified("gh72"), "f3"), 1, type_ctor(qualified(unqualified("gh72"), "t"), 0)), [bound(clobbered, inst_test_no_results, [bound_functor(cons(qualified(unqualified("gh72"), "package"), 2, type_ctor(unqualified(""), -1)), [bound(clobbered, inst_test_no_results, [bound_functor(string_const("fill3"), [])]), ground(clobbered, none_or_default_func)])])]), bound_functor(cons(qualified(unqualified("gh72"), "f4"), 1, type_ctor(qualified(unqualified("gh72"), "t"), 0)), [ground(shared, none_or_default_func)])]) | ||||
Tags | No tags attached. | ||||
Relationships | |||||
Attached Files |
There are no notes attached to this issue. |
Issue History | |||||
Date Modified | Username | Field | Change | ||
---|---|---|---|---|---|
2021-01-27 13:00 | wangp | New Issue |