<?xml version="1.0" encoding="utf-8"?>
<!--RSS generated by Flaimo.com RSS Builder [2026-04-14 18:16:54]-->
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"><channel><docs>https://bugs.mercurylang.org/</docs><link>https://bugs.mercurylang.org/</link><description><![CDATA[Mercury Bugs - Issues]]></description><title>Mercury Bugs - Issues</title><image><title>Mercury Bugs - Issues</title><url>https://bugs.mercurylang.org/images/mantis_logo_button.gif</url><link>https://bugs.mercurylang.org/</link><description><![CDATA[Mercury Bugs - Issues]]></description></image><language>en</language><category>All Projects</category><ttl>10</ttl><dc:language>en</dc:language><sy:updatePeriod>hourly</sy:updatePeriod><sy:updateFrequency>1</sy:updateFrequency><item><title>0000583: crash in LLDS .par grades</title><author></author><link>https://bugs.mercurylang.org/view.php?id=583</link><description><![CDATA[Here are some results of trying to bootcheck the asm_fast.par.gc grade on various Linux distributions. All tests were performed in a container on the same Linux host kernel, on a x86-64 machine.&lt;br /&gt;
&lt;br /&gt;
--------&lt;br /&gt;
&lt;br /&gt;
Debian 12&lt;br /&gt;
  GNU ld (GNU Binutils for Debian) 2.40&lt;br /&gt;
  gcc version 12.2.0 (Debian 12.2.0-14+deb12u1)&lt;br /&gt;
    - mercury-srcdist-rotd-2026-03-19 - ok&lt;br /&gt;
&lt;br /&gt;
Debian 13&lt;br /&gt;
  GNU ld (GNU Binutils for Debian) 2.44&lt;br /&gt;
  gcc version 14.2.0 (Debian 14.2.0-19)&lt;br /&gt;
    - mercury-srcdist-rotd-2026-03-19 - ok&lt;br /&gt;
&lt;br /&gt;
--------&lt;br /&gt;
&lt;br /&gt;
Ubuntu 20.04&lt;br /&gt;
  GNU ld (GNU Binutils for Ubuntu) 2.34&lt;br /&gt;
  gcc version 9.4.0 (Ubuntu 9.4.0-1ubuntu1~20.04.2)&lt;br /&gt;
    - mercury-srcdist-rotd-2026-03-19 - ok&lt;br /&gt;
&lt;br /&gt;
Ubuntu 22.04&lt;br /&gt;
  GNU ld (GNU Binutils for Ubuntu) 2.38&lt;br /&gt;
  gcc version 11.4.0 (Ubuntu 11.4.0-1ubuntu1~22.04.3)&lt;br /&gt;
    - mercury-srcdist-rotd-2026-03-19 - ok&lt;br /&gt;
&lt;br /&gt;
Ubuntu 24.04&lt;br /&gt;
  GNU ld (GNU Binutils for Ubuntu) 2.42&lt;br /&gt;
  gcc version 11.5.0 (Ubuntu 11.5.0-1ubuntu1~24.04.1)&lt;br /&gt;
    - mercury-srcdist-rotd-2026-03-19 - building of stage 3 dependencies not successful&lt;br /&gt;
  gcc version 12.4.0 (Ubuntu 12.4.0-2ubuntu1~24.04.1)&lt;br /&gt;
    - mercury-srcdist-rotd-2026-03-19 - building of stage 3 dependencies not successful&lt;br /&gt;
  gcc version 13.3.0 (Ubuntu 13.3.0-6ubuntu2~24.04.1) - default&lt;br /&gt;
    - mercury-srcdist-rotd-2026-03-19 - building of stage 3 dependencies not successful&lt;br /&gt;
  gcc version 14.2.0 (Ubuntu 14.2.0-4ubuntu2~24.04.1)&lt;br /&gt;
    - mercury-srcdist-rotd-2026-03-19 - building of stage 3 dependencies not successful&lt;br /&gt;
&lt;br /&gt;
--------&lt;br /&gt;
&lt;br /&gt;
Alpine Linux 3.20&lt;br /&gt;
  GNU ld (GNU Binutils) 2.42&lt;br /&gt;
  gcc version 13.2.1 20240309 (Alpine 13.2.1_git20240309)&lt;br /&gt;
    - mercury-srcdist-rotd-2026-03-19 - ok&lt;br /&gt;
&lt;br /&gt;
Alpine Linux 3.22&lt;br /&gt;
  GNU ld (GNU Binutils) 2.44&lt;br /&gt;
  gcc version 14.2.0 (Alpine 14.2.0)&lt;br /&gt;
    - mercury-srcdist-rotd-2026-03-19 - ok&lt;br /&gt;
&lt;br /&gt;
Alpine Linux 3.23&lt;br /&gt;
  GNU ld (GNU Binutils) 2.45.1&lt;br /&gt;
  gcc version 15.2.0 (Alpine 15.2.0)&lt;br /&gt;
    - mercury-srcdist-rotd-2026-03-19 - ok&lt;br /&gt;
&lt;br /&gt;
--------&lt;br /&gt;
&lt;br /&gt;
AlmaLinux 9&lt;br /&gt;
  GNU ld version 2.35.2-67.el9_7.1&lt;br /&gt;
  gcc version 11.5.0 20240719 (Red Hat 11.5.0-11) (GCC)&lt;br /&gt;
    - mercury-srcdist-rotd-2026-03-19 - ok&lt;br /&gt;
&lt;br /&gt;
AlmaLinux 10&lt;br /&gt;
  GNU ld version 2.41-58.el10_1.2.alma.1&lt;br /&gt;
  gcc version 14.3.1 20250617 (Red Hat 14.3.1-2) (GCC) - default&lt;br /&gt;
    - mercury-srcdist-rotd-2026-03-19 - building of stage 3 dependencies not successful&lt;br /&gt;
  gcc version 15.1.1 20250521 (Red Hat 15.1.1-2) (GCC)&lt;br /&gt;
    - mercury-srcdist-rotd-2026-03-19 - building of stage 3 dependencies not successful&lt;br /&gt;
&lt;br /&gt;
--------&lt;br /&gt;
&lt;br /&gt;
Fedora 43&lt;br /&gt;
  GNU ld version 2.45.1-4.fc43&lt;br /&gt;
  gcc version 14.3.1 20250808 (Red Hat 14.3.1-1) (GCC)&lt;br /&gt;
    - mercury-srcdist-rotd-2026-03-19 - ok&lt;br /&gt;
  gcc version 15.2.1 20260123 (Red Hat 15.2.1-7) (GCC) - default&lt;br /&gt;
    - mercury-srcdist-rotd-2026-03-19 - ok&lt;br /&gt;
&lt;br /&gt;
--------&lt;br /&gt;
&lt;br /&gt;
OpenSuSE Leap 15.6&lt;br /&gt;
  GNU ld (GNU Binutils; SUSE Linux Enterprise 15) 2.45.0.20251103-150100757&lt;br /&gt;
  gcc version 7.5.0 (SUSE Linux)&lt;br /&gt;
    - mercury-srcdist-rotd-2026-03-19 - ok&lt;br /&gt;
&lt;br /&gt;
OpenSuSE Tumbleweed&lt;br /&gt;
  GNU ld (GNU Binutils; openSUSE Tumbleweed) 2.45.0.20251103-2&lt;br /&gt;
  gcc version 15.2.1 20260202 (SUSE Linux)&lt;br /&gt;
    - mercury-srcdist-rotd-2026-03-19 - building of stage 3 dependencies not successful&lt;br /&gt;
&lt;br /&gt;
--------&lt;br /&gt;
&lt;br /&gt;
Void Linux&lt;br /&gt;
  GNU ld (GNU Binutils) 2.44&lt;br /&gt;
  gcc version 14.2.1 20250405 (GCC)&lt;br /&gt;
    - mercury-srcdist-rotd-2026-03-19 - ok&lt;br /&gt;
&lt;br /&gt;
--------&lt;br /&gt;
&lt;br /&gt;
I'm not sure what conclusions we can draw. The problem appears to be something particular to a distribution, rather than an issue with certain gcc or binutils versions. (But keeping in mind that distributions will have applied their own patches to those software packages.)]]></description><category>Bug</category><pubDate>Tue, 14 Apr 2026 12:50:30 +1000</pubDate><guid>https://bugs.mercurylang.org/view.php?id=583</guid><comments>https://bugs.mercurylang.org/view.php?id=583#bugnotes</comments></item><item><title>0000584: exception in high-level code generator when type referenced via import in parent module</title><author></author><link>https://bugs.mercurylang.org/view.php?id=584</link><description><![CDATA[The compiler crashes in the MLDS backend on the attached test case, where mod_a.sub1 references a type in a sibling module, relying on a import_module declaration in the parent module for visibility of that type.&lt;br /&gt;
&lt;br /&gt;
% mmc -s hlc.gc -m bugmain.all_cs&lt;br /&gt;
Making Mercury/int3s/bugmain.int3&lt;br /&gt;
Making Mercury/int3s/mod_a.int3&lt;br /&gt;
Making Mercury/int3s/mod_a.sub2.int3&lt;br /&gt;
Making Mercury/int3s/mod_a.sub1.int3&lt;br /&gt;
Making Mercury/int0s/mod_a.int0&lt;br /&gt;
Making Mercury/ints/mod_a.sub2.int&lt;br /&gt;
Making Mercury/ints/mod_a.sub1.int&lt;br /&gt;
Making Mercury/ints/mod_a.int&lt;br /&gt;
Making Mercury/ints/bugmain.int&lt;br /&gt;
Making Mercury/cs/bugmain.c&lt;br /&gt;
Uncaught Mercury exception:&lt;br /&gt;
Software Error: map.lookup: key not found&lt;br /&gt;
	Key Type: string&lt;br /&gt;
	Key Value: &quot;bbb&quot;&lt;br /&gt;
	Value Type: tree234.tree234(parse_tree.prog_data.type_ctor, hlds.hlds_data.hlds_type_defn)&lt;br /&gt;
Stack dump follows:&lt;br /&gt;
   0       pred exception.throw/1-0 (erroneous) (exception.m:312)&lt;br /&gt;
   1       pred require.error/1-0 (erroneous) (require.m:173)&lt;br /&gt;
   2       pred require.report_lookup_error/3-0 (erroneous) (require.m:277)&lt;br /&gt;
   3       pred map.lookup/3-0 (det) (map.m:1463)&lt;br /&gt;
   4       pred hlds.hlds_data.lookup_type_ctor_defn/3-0 (det) (hlds_data.m:598)&lt;br /&gt;
   5       func hlds.type_util.classify_type_ctor/2-0 (det) (type_util.m:1095)&lt;br /&gt;
   6       func ml_backend.mlds.mercury_type_to_mlds_type/2-0 (det) (mlds.m:2870)&lt;br /&gt;
   7       pred ml_backend.ml_code_util.ml_gen_local_var_decl/6-0 (det) (ml_code_util.m:956)&lt;br /&gt;
   8       pred ml_backend.ml_code_gen.ml_gen_local_var_decls/6-0 (det) (ml_code_gen.m:1393)&lt;br /&gt;
   9       pred ml_backend.ml_code_gen.ml_gen_goal/7-0 (det) (ml_code_gen.m:611)&lt;br /&gt;
  10       pred ml_backend.ml_proc_gen.ml_gen_proc_body/10-0 (det) (ml_proc_gen.m:1701)&lt;br /&gt;
  11       pred ml_backend.ml_proc_gen.ml_gen_proc/12-0 (det) (ml_proc_gen.m:630)&lt;br /&gt;
  12       pred list.foldl3/8-0 (det) (list.m:4236)&lt;br /&gt;
  13       pred ml_backend.ml_proc_gen.ml_gen_scc_code/11-0 (det) (ml_proc_gen.m:328)&lt;br /&gt;
  14       pred ml_backend.ml_proc_gen.ml_gen_scc/13-0 (det) (ml_proc_gen.m:233)&lt;br /&gt;
  15       pred ml_backend.ml_proc_gen.ml_gen_sccs/13-0 (det) (ml_proc_gen.m:217)&lt;br /&gt;
  16       pred ml_backend.ml_proc_gen.ml_gen_preds/10-0 (det) (ml_proc_gen.m:123)&lt;br /&gt;
  17       pred ml_backend.ml_top_gen.ml_code_gen/7-0 (det) (ml_top_gen.m:85)&lt;br /&gt;
  18       pred top_level.mercury_compile_mlds_back_end.hlds_to_mlds/9-0 (det) (mercury_compile_mlds_back_end.m:133)&lt;br /&gt;
  19       pred top_level.mercury_compile_augment.choose_and_execute_backend_passes/15-0 (det) (mercury_compile_augment.m:479)&lt;br /&gt;
  20       pred top_level.mercury_compile_augment.after_front_end_passes/14-0 (det) (mercury_compile_augment.m:412)&lt;br /&gt;
  21       pred top_level.mercury_compile_augment.process_augmented_module/16-0 (det) (mercury_compile_augment.m:283)&lt;br /&gt;
  22       pred top_level.mercury_compile_augment.augment_and_process_module/14-0 (det) (mercury_compile_augment.m:209)&lt;br /&gt;
  23       pred list.map_foldl3/9-0 (det) (list.m:4575)&lt;br /&gt;
  24       pred top_level.mercury_compile_augment.augment_and_process_all_submodules/15-0 (det) (mercury_compile_augment.m:158)&lt;br /&gt;
  25       pred top_level.mercury_compile_augment.augment_and_process_source_file/17-0 (det) (mercury_compile_augment.m:136)&lt;br /&gt;
  26       pred top_level.mercury_compile_main.read_augment_and_process_module/15-0 (det) (mercury_compile_main.m:1150)&lt;br /&gt;
  27       pred top_level.mercury_compile_main.do_process_compiler_arg/13-0 (det) (mercury_compile_main.m:788)&lt;br /&gt;
  28       pred top_level.mercury_compile_main.do_process_compiler_cmd_line_args/15-0 (det) (mercury_compile_main.m:606)&lt;br /&gt;
  29       pred top_level.mercury_compile_main.do_op_mode_args/13-0 (det) (mercury_compile_main.m:418)&lt;br /&gt;
  30       pred top_level.mercury_compile_main.do_op_mode/11-0 (det) (mercury_compile_main.m:236)&lt;br /&gt;
  31       pred top_level.mercury_compile_main.main_after_setup/6-0 (det) (mercury_compile_main.m:191)&lt;br /&gt;
  32       pred top_level.mercury_compile_main.main_for_make/6-0 (det) (mercury_compile_main.m:147)&lt;br /&gt;
  33       pred make.module_target.call_mercury_compile_main/7-0 (det) (make.module_target.m:613)&lt;br /&gt;
  34       pred libs.process_util.call_child_process_io_pred/4-0 (det) (process_util.m:458)&lt;br /&gt;
reached unknown label&lt;br /&gt;
** Error making `Mercury/cs/bugmain.c'.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
% mdb mmc -s hlc.gc -C bugmain --use-subdirs&lt;br /&gt;
Melbourne Mercury Debugger, mdb version DEV.&lt;br /&gt;
Copyright 1998-2012 The University of Melbourne.&lt;br /&gt;
Copyright 2013-2026 The Mercury team.&lt;br /&gt;
mdb is free software; there is absolutely no warranty for mdb.&lt;br /&gt;
       1:      1  1 CALL pred mercury_compile.main/2-0 (det) mercury_compile.m:31&lt;br /&gt;
mdb&gt; e&lt;br /&gt;
  697392: 243564 32 EXCP pred map.lookup/3-0 (det) e;c2; map.m:1463 (hlds_data.m:598)&lt;br /&gt;
mdb&gt; P&lt;br /&gt;
       Map (arg 1)            	three(&quot;float_box&quot;, two(type_ctor(qualified(unqualified(&quot;private_builtin&quot;), &quot;float_box&quot;), 0), hlds_type_defn/9, empty, empty), &quot;struct&quot;, two/4, three/7, three/7, three/7)&lt;br /&gt;
       K (arg 2)              	&quot;bbb&quot;]]></description><category>Bug</category><pubDate>Thu, 02 Apr 2026 17:23:44 +1100</pubDate><guid>https://bugs.mercurylang.org/view.php?id=584</guid><comments>https://bugs.mercurylang.org/view.php?id=584#bugnotes</comments></item><item><title>0000582: generate int switches for other integer types</title><author></author><link>https://bugs.mercurylang.org/view.php?id=582</link><description><![CDATA[The compiler ought to be able to generate all the different switch types on all integer types, not just `int'.&lt;br /&gt;
&lt;br /&gt;
We noticed this deficiency on a fact table of the form:&lt;br /&gt;
&lt;br /&gt;
:- pred action_table(int16::in, int16::in, uint16::out) is semidet.&lt;br /&gt;
action_table(0i16, 0i16, 1661u16).&lt;br /&gt;
action_table(0i16, 1i16, 1661u16).&lt;br /&gt;
action_table(0i16, 2i16, 1661u16).&lt;br /&gt;
action_table(0i16, 3i16, 1661u16).&lt;br /&gt;
action_table(0i16, 4i16, 1661u16).&lt;br /&gt;
action_table(0i16, 5i16, 1661u16).&lt;br /&gt;
action_table(0i16, 6i16, 1661u16).&lt;br /&gt;
action_table(0i16, 7i16, 1661u16).&lt;br /&gt;
action_table(0i16, 8i16, 1661u16).&lt;br /&gt;
action_table(0i16, 9i16, 1661u16).&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
In the end, we replaced the input arguments with `int's (which was fine, but shouldn't be necessary).]]></description><category>Bug</category><pubDate>Wed, 04 Mar 2026 20:09:32 +1100</pubDate><guid>https://bugs.mercurylang.org/view.php?id=582</guid><comments>https://bugs.mercurylang.org/view.php?id=582#bugnotes</comments></item><item><title>0000581: abort with Unexpected: SubDisjunctions0 != no</title><author></author><link>https://bugs.mercurylang.org/view.php?id=581</link><description><![CDATA[Compiling the attach program with:&lt;br /&gt;
&lt;br /&gt;
    mmc --allow-stubs -C zinc_rt_driver.m&lt;br /&gt;
&lt;br /&gt;
results in:&lt;br /&gt;
&lt;br /&gt;
Uncaught Mercury exception:&lt;br /&gt;
Software Error: predicate `check_hlds.scout_disjunctions.scout_disjunctions_in_goal'/10: Unexpected: SubDisjunctions0 != no&lt;br /&gt;
Stack dump not available in this grade.]]></description><category>Bug</category><pubDate>Tue, 17 Feb 2026 01:31:17 +1100</pubDate><guid>https://bugs.mercurylang.org/view.php?id=581</guid><comments>https://bugs.mercurylang.org/view.php?id=581#bugnotes</comments></item><item><title>0000580: parse foreign_proc body into comments vs non-comments</title><author></author><link>https://bugs.mercurylang.org/view.php?id=580</link><description><![CDATA[It should be relatively easy to parse C/C#/Java foreign_proc bodies into comments and non-comment sections. Then we could avoid false positive warnings about &quot;return&quot; statements when the word &quot;return&quot; appears within a comment.&lt;br /&gt;
&lt;br /&gt;
There are cases where we deliberately name a variable within a comment to suppress a warning about a variable not occurring, but perhaps in those cases the variable would have an underscore prefix, e.g.&lt;br /&gt;
&lt;br /&gt;
:- pragma foreign_proc(&quot;C#&quot;,&lt;br /&gt;
    min(_Array::in, Min::out),&lt;br /&gt;
    [will_not_call_mercury, promise_pure, thread_safe],&lt;br /&gt;
&quot;&lt;br /&gt;
    // Array not used.&lt;br /&gt;
    Min = 0;&lt;br /&gt;
&quot;).&lt;br /&gt;
&lt;br /&gt;
Also, in C at least, that code could have been written as (void)Array;]]></description><category>Feature Request</category><pubDate>Fri, 30 Jan 2026 23:59:15 +1100</pubDate><guid>https://bugs.mercurylang.org/view.php?id=580</guid><comments>https://bugs.mercurylang.org/view.php?id=580#bugnotes</comments></item><item><title>0000579: Unrecognised options in Mercury.options files not reported correctly</title><author></author><link>https://bugs.mercurylang.org/view.php?id=579</link><description><![CDATA[Attempting to compile a program with mmc --make (e.g. samples/hello.m) and a Mercury.options file containing the following:&lt;br /&gt;
&lt;br /&gt;
    MCFLAGS=--i-am-not-an-option&lt;br /&gt;
&lt;br /&gt;
causes the compiler to print:&lt;br /&gt;
&lt;br /&gt;
mercury_compile:&lt;br /&gt;
Error: the location of the directory that holds the Mercury standard library is&lt;br /&gt;
  not specified&lt;br /&gt;
  either by an `--mercury-stdlib-dir' option,&lt;br /&gt;
  or by an environment variable named `MERCURY_STDLIB_DIR',&lt;br /&gt;
  or by a make variable named `MERCURY_STDLIB_DIR' in any specified options]]></description><category>Bug</category><pubDate>Mon, 15 Dec 2025 04:21:17 +1100</pubDate><guid>https://bugs.mercurylang.org/view.php?id=579</guid><comments>https://bugs.mercurylang.org/view.php?id=579#bugnotes</comments></item><item><title>0000578: Switch detection regression</title><author></author><link>https://bugs.mercurylang.org/view.php?id=578</link><description><![CDATA[After commit c9e549996 (&quot;Let switch detection handle deeper disjunctions.&quot;), the compiler no longer accepts the given test case.&lt;br /&gt;
&lt;br /&gt;
% mmc -e switch_detection_regression.m                &lt;br /&gt;
switch_detection_regression.m:017: Error: the determinism declaration for&lt;br /&gt;
switch_detection_regression.m:017:   predicate `halign'/5 is not satisfied.&lt;br /&gt;
switch_detection_regression.m:017:   Declared `det', inferred `nondet'.&lt;br /&gt;
switch_detection_regression.m:017:   The reasons for the difference are the&lt;br /&gt;
switch_detection_regression.m:017:   following.&lt;br /&gt;
switch_detection_regression.m:029:&lt;br /&gt;
switch_detection_regression.m:029:   Unification of `Dir' and&lt;br /&gt;
switch_detection_regression.m:029:   `switch_detection_regression.ltr' can&lt;br /&gt;
switch_detection_regression.m:029:   fail.&lt;br /&gt;
switch_detection_regression.m:031:&lt;br /&gt;
switch_detection_regression.m:031:   Unification of `Dir' and&lt;br /&gt;
switch_detection_regression.m:031:   `switch_detection_regression.rtl' can&lt;br /&gt;
switch_detection_regression.m:031:   fail.&lt;br /&gt;
switch_detection_regression.m:032:&lt;br /&gt;
switch_detection_regression.m:032:   Inside the case end/0 of the switch on&lt;br /&gt;
switch_detection_regression.m:032:   TextAlign:&lt;br /&gt;
switch_detection_regression.m:032:   disjunction has more than one disjunct&lt;br /&gt;
switch_detection_regression.m:032:   with solutions.&lt;br /&gt;
switch_detection_regression.m:041:&lt;br /&gt;
switch_detection_regression.m:041:   This later disjunct may have a solution.&lt;br /&gt;
switch_detection_regression.m:032:&lt;br /&gt;
switch_detection_regression.m:032:   Inside the case start/0 of the switch on&lt;br /&gt;
switch_detection_regression.m:032:   TextAlign:&lt;br /&gt;
switch_detection_regression.m:032:   disjunction has more than one disjunct&lt;br /&gt;
switch_detection_regression.m:032:   with solutions.&lt;br /&gt;
switch_detection_regression.m:041:&lt;br /&gt;
switch_detection_regression.m:041:   This later disjunct may have a solution.&lt;br /&gt;
switch_detection_regression.m:038:&lt;br /&gt;
switch_detection_regression.m:038:   Unification of `Dir' and&lt;br /&gt;
switch_detection_regression.m:038:   `switch_detection_regression.ltr' can&lt;br /&gt;
switch_detection_regression.m:038:   fail.&lt;br /&gt;
switch_detection_regression.m:040:&lt;br /&gt;
switch_detection_regression.m:040:   Unification of `Dir' and&lt;br /&gt;
switch_detection_regression.m:040:   `switch_detection_regression.rtl' can&lt;br /&gt;
switch_detection_regression.m:040:   fail.]]></description><category>Bug</category><pubDate>Thu, 20 Nov 2025 20:06:50 +1100</pubDate><guid>https://bugs.mercurylang.org/view.php?id=578</guid><comments>https://bugs.mercurylang.org/view.php?id=578#bugnotes</comments></item><item><title>0000575: type qualification scope bug</title><author></author><link>https://bugs.mercurylang.org/view.php?id=575</link><description><![CDATA[Explicit type qualification is processed before quantification, leading to variables being given explicit types without taking into account that variables with the same name might be in different scopes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:- module type_qual_bug.&lt;br /&gt;
:- interface.&lt;br /&gt;
&lt;br /&gt;
:- pred bug1 is det.&lt;br /&gt;
:- pred bug2 is det.&lt;br /&gt;
&lt;br /&gt;
:- implementation.&lt;br /&gt;
&lt;br /&gt;
:- type foo1&lt;br /&gt;
    ---&gt;    foo(int).&lt;br /&gt;
&lt;br /&gt;
:- type foo2&lt;br /&gt;
    ---&gt;    foo(int).&lt;br /&gt;
&lt;br /&gt;
bug1 :-&lt;br /&gt;
    % X is assigned the type foo1 due to an explicit type qualification.&lt;br /&gt;
    % Later, when the Xs are renamed apart, the type is copied over to both&lt;br /&gt;
    % new variables. Obviously, the two Xs are not supposed to be related.&lt;br /&gt;
    some [X] (&lt;br /&gt;
        X = foo(1) : foo1&lt;br /&gt;
    ),&lt;br /&gt;
    some [X] (&lt;br /&gt;
        X = foo(2) : foo2&lt;br /&gt;
    ).&lt;br /&gt;
&lt;br /&gt;
bug2 :-&lt;br /&gt;
    % Both X variables end up with type foo2, so this compiles.&lt;br /&gt;
    % But the type of the first X should be ambiguous.&lt;br /&gt;
    some [X] (&lt;br /&gt;
        X = foo(1)&lt;br /&gt;
    ),&lt;br /&gt;
    some [X] (&lt;br /&gt;
        X = foo(2) : foo2&lt;br /&gt;
    ).]]></description><category>Bug</category><pubDate>Wed, 13 Aug 2025 07:35:47 +1000</pubDate><guid>https://bugs.mercurylang.org/view.php?id=575</guid><comments>https://bugs.mercurylang.org/view.php?id=575#bugnotes</comments></item><item><title>0000577: composite enums</title><author></author><link>https://bugs.mercurylang.org/view.php?id=577</link><description><![CDATA[Types such as the ext type in the compiler, which have&lt;br /&gt;
&lt;br /&gt;
- several function symbols,&lt;br /&gt;
- all of which one argument,&lt;br /&gt;
- and all those arguments have types that are effectively enums,&lt;br /&gt;
&lt;br /&gt;
should be themselves represented as one large enum.&lt;br /&gt;
&lt;br /&gt;
Given e.g.&lt;br /&gt;
&lt;br /&gt;
:- type t&lt;br /&gt;
   ---&gt; f(t1)&lt;br /&gt;
   ;    g(t2).&lt;br /&gt;
&lt;br /&gt;
where t1 is an enum with values 0-12 and t2 is an enum&lt;br /&gt;
with values 0-42, then t should be such a &quot;composite enum&quot;&lt;br /&gt;
with values 0-55, with values 0-12 corresponding to function&lt;br /&gt;
symbol f, and values 13-55 corresponding to g (with the value&lt;br /&gt;
of g's argument being t's value minus 13.&lt;br /&gt;
&lt;br /&gt;
The natural way to do switches on such composite enums&lt;br /&gt;
would be by binary search, not on the raw values, but on&lt;br /&gt;
the dividing lines between the integer ranges assigned to&lt;br /&gt;
the function symbols. Each binary step would rule out half&lt;br /&gt;
(rounded down) of the remaining possible function symbols.]]></description><category>Feature Request</category><pubDate>Wed, 13 Aug 2025 03:27:29 +1000</pubDate><guid>https://bugs.mercurylang.org/view.php?id=577</guid><comments>https://bugs.mercurylang.org/view.php?id=577#bugnotes</comments></item><item><title>0000576: Abort in pre_typecheck</title><author></author><link>https://bugs.mercurylang.org/view.php?id=576</link><description><![CDATA[Compiling the attached module causes the following abort:&lt;br /&gt;
&lt;br /&gt;
Uncaught Mercury exception:&lt;br /&gt;
Software Error: function `check_hlds.pre_typecheck.arg_num_pieces'/2: Unexpected: ArgNum is not numbered correctly for return value]]></description><category>Bug</category><pubDate>Sat, 05 Jul 2025 19:54:52 +1000</pubDate><guid>https://bugs.mercurylang.org/view.php?id=576</guid><comments>https://bugs.mercurylang.org/view.php?id=576#bugnotes</comments></item><item><title>0000574: Higher-order inst gets lost when using combined higher-order type and inst</title><author></author><link>https://bugs.mercurylang.org/view.php?id=574</link><description><![CDATA[The attached program is a very cut-down version of a problem reported by a user on twitter.&lt;br /&gt;
Compiling the attached results in:&lt;br /&gt;
&lt;br /&gt;
     bug574.m:017: In clause for `process_job(in, di, uo)':&lt;br /&gt;
     bug574.m:017:   in argument 1 of call to predicate `bug574.do_process_job1'/3:&lt;br /&gt;
     bug574.m:017:   mode error: variable `Pred' has instantiatedness `ground',&lt;br /&gt;
     bug574.m:017:   expected instantiatedness was `(pred(in, di, uo) is det)'.&lt;br /&gt;
&lt;br /&gt;
I can see no reason why Pred has that instantiatedness, unless it is some limitation of the combined higher-order types and insts implementation or an actual bug.]]></description><category>Bug</category><pubDate>Mon, 06 May 2024 00:46:04 +1000</pubDate><guid>https://bugs.mercurylang.org/view.php?id=574</guid><comments>https://bugs.mercurylang.org/view.php?id=574#bugnotes</comments></item><item><title>0000573: mmc --make regression remaking .opt files unnecessarily</title><author></author><link>https://bugs.mercurylang.org/view.php?id=573</link><description><![CDATA[Commit 8b5cc5125 (&quot;Use string builders for .*opt files.&quot;)&lt;br /&gt;
introduces a regression where .opt files are remade unnecessarily.&lt;br /&gt;
Using the samples/diff program for example:&lt;br /&gt;
&lt;br /&gt;
    % mmc --intermod-opt -j32 -m diff&lt;br /&gt;
    [... trimmed output ...]&lt;br /&gt;
    Making diff&lt;br /&gt;
&lt;br /&gt;
    % touch match.m&lt;br /&gt;
&lt;br /&gt;
    % mmc --intermod-opt -m diff&lt;br /&gt;
    Making Mercury/int3s/match.int3&lt;br /&gt;
    Making Mercury/ints/match.int&lt;br /&gt;
    Making Mercury/opts/match.opt&lt;br /&gt;
    ** Nothing to be done for `diff'.&lt;br /&gt;
&lt;br /&gt;
    % mmc --intermod-opt -m diff&lt;br /&gt;
    Making Mercury/int3s/match.int3&lt;br /&gt;
    Making Mercury/opts/match.opt&lt;br /&gt;
    ** Nothing to be done for `diff'.&lt;br /&gt;
&lt;br /&gt;
where every subsequent invocation of mmc --make will keep remaking match.opt.]]></description><category>Bug</category><pubDate>Fri, 23 Feb 2024 16:44:43 +1100</pubDate><guid>https://bugs.mercurylang.org/view.php?id=573</guid><comments>https://bugs.mercurylang.org/view.php?id=573#bugnotes</comments></item><item><title>0000572: Code generator abort in debugging grades</title><author></author><link>https://bugs.mercurylang.org/view.php?id=572</link><description><![CDATA[The attached is a cut-down version of a program that causes an abort in debugging grades originally reported by Volker Wysk on the reviews list on 3 January 2024. Compiling it in a debugging grade results in:&lt;br /&gt;
&lt;br /&gt;
Uncaught Mercury exception:&lt;br /&gt;
Software Error: predicate `ll_backend.liveness.require_equal'/4: Unexpected: branches of if-then-else disagree on liveness&lt;br /&gt;
First: ArgDesc_3, Values_4, MDef_5, Default_6, TypeClassInfo_for_argument_21, TypeInfo_22_22&lt;br /&gt;
Rest:  ArgDesc_3, Values_4, MDef_5, Default_6, TypeInfo_22_22]]></description><category>Bug</category><pubDate>Tue, 20 Feb 2024 17:38:33 +1100</pubDate><guid>https://bugs.mercurylang.org/view.php?id=572</guid><comments>https://bugs.mercurylang.org/view.php?id=572#bugnotes</comments></item><item><title>0000571: Improve unsatisfiable typeclass constraint errors</title><author></author><link>https://bugs.mercurylang.org/view.php?id=571</link><description><![CDATA[The attached program generates the following error messages:&lt;br /&gt;
&lt;br /&gt;
    unsat_error.m:015: In clause for predicate `create_schedule'/3:&lt;br /&gt;
    unsat_error.m:015:   unsatisfiable typeclass constraint:&lt;br /&gt;
    unsat_error.m:015:   `unsat_error.logger(L)'.&lt;br /&gt;
&lt;br /&gt;
For cases like this it would better if we could provide the user some indication of the cause of this constraint being unsatisfiable, namely that the there is no constraint on the type variable Logger in the predicate declaration.]]></description><category>Feature Request</category><pubDate>Fri, 09 Feb 2024 15:29:30 +1100</pubDate><guid>https://bugs.mercurylang.org/view.php?id=571</guid><comments>https://bugs.mercurylang.org/view.php?id=571#bugnotes</comments></item><item><title>0000570: merge switch after switch bug</title><author></author><link>https://bugs.mercurylang.org/view.php?id=570</link><description><![CDATA[The compiler aborts during the deforestation, when simplify tries to merge a switch after switch:&lt;br /&gt;
&lt;br /&gt;
% mmc -C --deforestation bug.m&lt;br /&gt;
Uncaught Mercury exception:&lt;br /&gt;
Software Error: map.lookup: key not found&lt;br /&gt;
        Key Type: parse_tree.prog_data.cons_id&lt;br /&gt;
        Key Value: cons(qualified(unqualified(&quot;bug&quot;), &quot;prepare_edit&quot;), 0, type_ctor(qualified(unqualified(&quot;bug&quot;), &quot;prepare_temp&quot;), 0))&lt;br /&gt;
        Value Type: uint&lt;br /&gt;
Stack dump follows:&lt;br /&gt;
   0       pred exception.throw/1-0 (erroneous) (exception.m:312)&lt;br /&gt;
   1       pred require.error/1-0 (erroneous) (require.m:173)&lt;br /&gt;
   2       pred require.report_lookup_error/3-0 (erroneous) (require.m:277)&lt;br /&gt;
   3       pred map.lookup/3-0 (det) (map.m:1333)&lt;br /&gt;
   4       pred check_hlds.simplify.simplify_goal_conj.build_maps_second_switch_cons_id/5-0 (det) (simplify_goal_conj.m:663)&lt;br /&gt;
   5       pred check_hlds.simplify.simplify_goal_conj.build_maps_second_switch/7-0 (det) (simplify_goal_conj.m:648)&lt;br /&gt;
   6       pred check_hlds.simplify.simplify_goal_conj.try_to_merge_switch_after_switch/6-0 (det) (simplify_goal_conj.m:586)&lt;br /&gt;
   7    6* pred check_hlds.simplify.simplify_goal_conj.simplify_conj/10-0 (det) (simplify_goal_conj.m:285 and others)&lt;br /&gt;
  13       pred check_hlds.simplify.simplify_goal_conj.simplify_goal_plain_conj/10-0 (det) (simplify_goal_conj.m:82)&lt;br /&gt;
  14       pred check_hlds.simplify.simplify_goal.simplify_goal_expr/10-0 (det) (simplify_goal.m:331)&lt;br /&gt;
  15       pred check_hlds.simplify.simplify_goal.simplify_goal/8-0 (det) (simplify_goal.m:285)&lt;br /&gt;
  16    2* pred check_hlds.simplify.simplify_goal_switch.simplify_switch_cases/15-0 (det) (simplify_goal_switch.m:278 and others)&lt;br /&gt;
  18       pred check_hlds.simplify.simplify_goal_switch.simplify_goal_switch/10-0 (det) (simplify_goal_switch.m:85)&lt;br /&gt;
  19       pred check_hlds.simplify.simplify_goal.simplify_goal_expr/10-0 (det) (simplify_goal.m:344)&lt;br /&gt;
  20       pred check_hlds.simplify.simplify_goal.simplify_goal/8-0 (det) (simplify_goal.m:285)&lt;br /&gt;
  21       pred check_hlds.simplify.simplify_proc.do_simplify_top_level_goal/6-0 (det) (simplify_proc.m:708)&lt;br /&gt;
  22       pred check_hlds.simplify.simplify_proc.simplify_top_level_goal/7-0 (det) (simplify_proc.m:611)&lt;br /&gt;
  23       pred check_hlds.simplify.simplify_proc.simplify_goal_update_vars_in_proc/11-0 (det) (simplify_proc.m:201)&lt;br /&gt;
  24       pred transform_hlds.pd_util.pd_simplify_goal/5-0 (det) (pd_util.m:264)&lt;br /&gt;
  25       pred transform_hlds.deforest.push_goal_into_goal/8-0 (det) (deforest.m:1844)&lt;br /&gt;
  26       pred transform_hlds.deforest.handle_deforestation/9-0 (det) (deforest.m:761)&lt;br /&gt;
  27    3* pred transform_hlds.deforest.deforest_conj/6-0 (det) (deforest.m:566 and others)&lt;br /&gt;
  30       pred transform_hlds.deforest.deforest_goal_expr/6-0 (det) (deforest.m:319)&lt;br /&gt;
  31       pred transform_hlds.deforest.deforest_goal/4-0 (det) (deforest.m:294)&lt;br /&gt;
  32       pred transform_hlds.deforest.deforest_proc_deltas/5-0 (det) (deforest.m:230)&lt;br /&gt;
  33       pred transform_hlds.deforest.deforest_proc/3-0 (det) (deforest.m:204)&lt;br /&gt;
  34    5* pred list.foldl/4-0 (det) (list.m:3731 and others)&lt;br /&gt;
  39       pred transform_hlds.deforest.deforest_module/3-0 (det) (deforest.m:132)&lt;br /&gt;
  40       pred top_level.mercury_compile_middle_passes.maybe_deforestation/7-0 (det) (mercury_compile_middle_passes.m:1130)&lt;br /&gt;
  41       pred top_level.mercury_compile_middle_passes.middle_pass/10-0 (det) (mercury_compile_middle_passes.m:232)&lt;br /&gt;
  42       pred top_level.mercury_compile_main.after_front_end_passes/15-0 (det) (mercury_compile_main.m:2177)&lt;br /&gt;
  43       pred top_level.mercury_compile_main.process_augmented_module/17-0 (det) (mercury_compile_main.m:2052)&lt;br /&gt;
  44       pred top_level.mercury_compile_main.augment_and_process_module/15-0 (det) (mercury_compile_main.m:1926)&lt;br /&gt;
  45       pred list.map_foldl3/9-0 (det) (list.m:4080)&lt;br /&gt;
  46       pred top_level.mercury_compile_main.augment_and_process_all_submodules/16-0 (det) (mercury_compile_main.m:1872)&lt;br /&gt;
  47       pred top_level.mercury_compile_main.read_augment_and_process_module_ok/17-0 (det) (mercury_compile_main.m:1730)&lt;br /&gt;
  48       pred top_level.mercury_compile_main.read_augment_and_process_module/15-0 (det) (mercury_compile_main.m:1672)&lt;br /&gt;
  49       pred top_level.mercury_compile_main.do_process_compiler_arg/13-0 (det) (mercury_compile_main.m:1238)&lt;br /&gt;
  50       pred top_level.mercury_compile_main.setup_and_process_compiler_arg/17-0 (det) (mercury_compile_main.m:1102)&lt;br /&gt;
  51       pred top_level.mercury_compile_main.setup_and_process_compiler_cmd_line_args/19-0 (det) (mercury_compile_main.m:1013)&lt;br /&gt;
  52       pred top_level.mercury_compile_main.do_op_mode_args/16-0 (det) (mercury_compile_main.m:859)&lt;br /&gt;
  53       pred top_level.mercury_compile_main.do_op_mode/14-0 (det) (mercury_compile_main.m:662)&lt;br /&gt;
  54       pred top_level.mercury_compile_main.main_after_setup/9-0 (det) (mercury_compile_main.m:614)&lt;br /&gt;
  55       pred top_level.mercury_compile_main.real_main_after_expansion/5-0 (det) (mercury_compile_main.m:315)&lt;br /&gt;
  56       pred top_level.mercury_compile_main.real_main/2-0 (det) (mercury_compile_main.m:153)&lt;br /&gt;
  57       pred mercury_compile.main/2-0 (det) (mercury_compile.m:32)]]></description><category>Bug</category><pubDate>Wed, 13 Dec 2023 19:06:42 +1100</pubDate><guid>https://bugs.mercurylang.org/view.php?id=570</guid><comments>https://bugs.mercurylang.org/view.php?id=570#bugnotes</comments></item><item><title>0000569: timestamp regression with nested submodules in mmc --make</title><author></author><link>https://bugs.mercurylang.org/view.php?id=569</link><description><![CDATA[Here is a problem with nested submodules attributed to commit 4d4ef3e3a &quot;Cache timestamps by target file.&quot;&lt;br /&gt;
&lt;br /&gt;
This sequence of commands:&lt;br /&gt;
```&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
touch nested_module_test.m&lt;br /&gt;
mmc -m nested_module_test&lt;br /&gt;
sleep 1&lt;br /&gt;
echo --------&lt;br /&gt;
mmc -m nested_module_test&lt;br /&gt;
```&lt;br /&gt;
&lt;br /&gt;
exhibits this incorrect behaviour:&lt;br /&gt;
&lt;br /&gt;
Making Mercury/int3s/nested_module_test.int3&lt;br /&gt;
Making Mercury/int0s/nested_module_test.int0&lt;br /&gt;
Making Mercury/ints/nested_module_test.int&lt;br /&gt;
Making Mercury/cs/nested_module_test.c&lt;br /&gt;
Making Mercury/os/nested_module_test.o&lt;br /&gt;
Making nested_module_test&lt;br /&gt;
--------&lt;br /&gt;
Making Mercury/int3s/nested_module_test.int3&lt;br /&gt;
Making Mercury/os/nested_module_test.sub.o&lt;br /&gt;
Making nested_module_test&lt;br /&gt;
&lt;br /&gt;
where nested_module_test.sub.o and nested_module_test are re-made by the second call to mmc --make, when they should already be up-to-date.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The previous (correct) behaviour is:&lt;br /&gt;
&lt;br /&gt;
Making Mercury/int3s/nested_module_test.int3&lt;br /&gt;
Making Mercury/int0s/nested_module_test.int0&lt;br /&gt;
Making Mercury/ints/nested_module_test.int&lt;br /&gt;
Making Mercury/cs/nested_module_test.c&lt;br /&gt;
Making Mercury/os/nested_module_test.o&lt;br /&gt;
Making Mercury/os/nested_module_test.sub.o&lt;br /&gt;
Making nested_module_test&lt;br /&gt;
--------&lt;br /&gt;
Making Mercury/int3s/nested_module_test.int3&lt;br /&gt;
** Nothing to be done for `nested_module_test'.&lt;br /&gt;
&lt;br /&gt;
[Actually, nested_module_test.int3 should not need to be remade either - that is a long-standing bug, but a minor one.]]]></description><category>Bug</category><pubDate>Wed, 06 Dec 2023 12:51:54 +1100</pubDate><guid>https://bugs.mercurylang.org/view.php?id=569</guid><comments>https://bugs.mercurylang.org/view.php?id=569#bugnotes</comments></item><item><title>0000568: nested sub-modules broken in mmc --make</title><author></author><link>https://bugs.mercurylang.org/view.php?id=568</link><description><![CDATA[mmc --make fails to make programs making using of nested sub-modules.&lt;br /&gt;
&lt;br /&gt;
The problem first appears with commit 764eab72a &quot;Stop using module_dep_infos in computing filenames.&quot;&lt;br /&gt;
&lt;br /&gt;
% mmc --make nested_module_test&lt;br /&gt;
** dependencies for `Mercury/int3s/nested_module_test.int3' do not exist: nested_module_test.sub.m&lt;br /&gt;
** This indicates a bug in `mmc --make'.]]></description><category>Bug</category><pubDate>Tue, 05 Dec 2023 13:42:32 +1100</pubDate><guid>https://bugs.mercurylang.org/view.php?id=568</guid><comments>https://bugs.mercurylang.org/view.php?id=568#bugnotes</comments></item><item><title>0000567: regression due to merging consecutive switches</title><author></author><link>https://bugs.mercurylang.org/view.php?id=567</link><description><![CDATA[I have bisected a regression to commit 43dd12bd5b9608dcd150ea0c7bdc1e3f256f15d2&lt;br /&gt;
&quot;Merge consecutive switches on the same variable.&quot;&lt;br /&gt;
&lt;br /&gt;
See the attached test case.&lt;br /&gt;
&lt;br /&gt;
This is incorrect:&lt;br /&gt;
&lt;br /&gt;
% mmc -O2 regression_merge_switches &amp;&amp; ./regression_merge_switches&lt;br /&gt;
header(field_name(&quot;Message-ID&quot;), header_value(&quot;Tue, 7 Nov 2023 12:29:43 +1100&quot;))&lt;br /&gt;
header(field_name(&quot;Message-ID&quot;), header_value(&quot;&lt;&lt;a href=&quot;mailto:20231107122943.GB219@example&quot;&gt;20231107122943.GB219@example&lt;/a&gt;&gt;&quot;))&lt;br /&gt;
&lt;br /&gt;
The correct output is this:&lt;br /&gt;
&lt;br /&gt;
% mmc -O1 regression_merge_switches &amp;&amp; ./regression_merge_switches&lt;br /&gt;
header(field_name(&quot;Date&quot;), header_value(&quot;Tue, 7 Nov 2023 12:29:43 +1100&quot;))&lt;br /&gt;
header(field_name(&quot;Message-ID&quot;), header_value(&quot;&lt;&lt;a href=&quot;mailto:20231107122943.GB219@example&quot;&gt;20231107122943.GB219@example&lt;/a&gt;&gt;&quot;))]]></description><category>Bug</category><pubDate>Wed, 08 Nov 2023 17:59:38 +1100</pubDate><guid>https://bugs.mercurylang.org/view.php?id=567</guid><comments>https://bugs.mercurylang.org/view.php?id=567#bugnotes</comments></item><item><title>0000566: undefined variable warnings with GNU Make 4.4.0.90</title><author></author><link>https://bugs.mercurylang.org/view.php?id=566</link><description><![CDATA[Since GNU Make 4.4.0.90, we get warnings about undefined variables '*' and '@':&lt;br /&gt;
&lt;br /&gt;
/tmp/mmake.RTEA5X:64: warning: undefined variable '*'&lt;br /&gt;
/tmp/mmake.RTEA5X:64: warning: undefined variable '@'&lt;br /&gt;
/tmp/mmake.RTEA5X:64: warning: undefined variable '@'&lt;br /&gt;
&lt;br /&gt;
The problem first appears with GNU Make commit 15dfad96d77c9445d11be939a5042675e4ca8c65 &quot;[SV 63439, SV 63452] Don't warn on undefined internal variables&quot;&lt;br /&gt;
&lt;a href=&quot;https://git.savannah.gnu.org/cgit/make.git/commit/?id=15dfad96d77c9445d11be939a5042675e4ca8c65&quot;&gt;https://git.savannah.gnu.org/cgit/make.git/commit/?id=15dfad96d77c9445d11be939a5042675e4ca8c65&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
The code that ultimately triggers these warnings is in Mmake.vars.in, from lines 374 onwards, that says:&lt;br /&gt;
&lt;br /&gt;
# `TARGET_&lt;prog&gt;FLAGS' is used to pass different flags to &lt;prog&gt; for&lt;br /&gt;
# different targets. By setting MCFLAGS-foo, for example, you can add&lt;br /&gt;
# extra values to TARGET_MCFLAGS that will used only for compiling foo.m.&lt;br /&gt;
#&lt;br /&gt;
# For each program &lt;prog&gt;, `TARGET_&lt;prog&gt;FLAGS' expands to&lt;br /&gt;
# `$(&lt;prog&gt;FLAGS-$@)' and/or `$(&lt;prog&gt;FLAGS-$*)'.&lt;br /&gt;
# $@ and $* are the builtin variables that expand to the&lt;br /&gt;
# current target and (for pattern rules) the base name of the current target,&lt;br /&gt;
# respectively. So $* is used for flags variables used by pattern rules,&lt;br /&gt;
# whereas $@ is used for flags variables used by hard-coded rules,&lt;br /&gt;
# including the ones in the generated .dep files.&lt;br /&gt;
#&lt;br /&gt;
# The code below uses some tricky GNU Make hacks to avoid expanding&lt;br /&gt;
# &lt;prog&gt;FLAGS-$* and &lt;prog&gt;FLAGS-$@ if these vars are not defined,&lt;br /&gt;
# so that we can avoid spurious warnings if the warning about&lt;br /&gt;
# undefined variables is enabled.]]></description><category>Bug</category><pubDate>Mon, 16 Oct 2023 17:01:55 +1100</pubDate><guid>https://bugs.mercurylang.org/view.php?id=566</guid><comments>https://bugs.mercurylang.org/view.php?id=566#bugnotes</comments></item><item><title>0000208: add help and version command line options to mslice and mdice</title><author></author><link>https://bugs.mercurylang.org/view.php?id=208</link><description><![CDATA[-h and -v are pretty standard command line options, but mslice and mdice don't support them. For example:&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;mailto:ajrross@goofy&quot;&gt;ajrross@goofy&lt;/a&gt;:~$ mslice -h&lt;br /&gt;
unrecognized option `-h'&lt;br /&gt;
&lt;br /&gt;
Since the usage information of both programs is already displayed when the user gives an incorrect number of arguments, -h could show the same information.]]></description><category>Bug</category><pubDate>Sun, 08 Oct 2023 12:24:18 +1100</pubDate><guid>https://bugs.mercurylang.org/view.php?id=208</guid><comments>https://bugs.mercurylang.org/view.php?id=208#bugnotes</comments></item><item><title>0000563: type constructor for equivalence type not found</title><author></author><link>https://bugs.mercurylang.org/view.php?id=563</link><description><![CDATA[The compiler throws an exception when compiling the attached test case in hlc (and probably other MLDS grades).&lt;br /&gt;
&lt;br /&gt;
quirks.m defines an equivalence type in the implementation which uses a type constructor that it imports:&lt;br /&gt;
    :- import_module set.&lt;br /&gt;
    :- type quirks == set(string).&lt;br /&gt;
&lt;br /&gt;
But when generating code for a module that imports quirks.m, that type constructor is not found.&lt;br /&gt;
&lt;br /&gt;
% mmake GRADE=hlc.gc getprop.depend&lt;br /&gt;
% mmake GRADE=hlc.gc getprop.c&lt;br /&gt;
% cat getprop.err &lt;br /&gt;
Uncaught Mercury exception:&lt;br /&gt;
Software Error: map.lookup: key not found&lt;br /&gt;
        Key Type: string&lt;br /&gt;
        Key Value: &quot;set&quot;&lt;br /&gt;
        Value Type: tree234.tree234(parse_tree.prog_data.type_ctor, hlds.hlds_data.hlds_type_defn)&lt;br /&gt;
Stack dump follows:&lt;br /&gt;
   0       pred exception.throw/1-0 (erroneous) (exception.m:313)&lt;br /&gt;
   1       pred require.error/1-0 (erroneous) (require.m:172)&lt;br /&gt;
   2       pred require.report_lookup_error/3-0 (erroneous) (require.m:276)&lt;br /&gt;
   3       pred map.lookup/3-0 (det) (map.m:1272)&lt;br /&gt;
   4       pred hlds.hlds_data.lookup_type_ctor_defn/3-0 (det) (hlds_data.m:598)&lt;br /&gt;
   5       func check_hlds.type_util.classify_type_ctor/2-0 (det) (type_util.m:1038)&lt;br /&gt;
   6       func ml_backend.mlds.mercury_type_to_mlds_type/2-0 (det) (mlds.m:2661)&lt;br /&gt;
   7       pred ml_backend.ml_code_util.ml_gen_local_var_decl/6-0 (det) (ml_code_util.m:998)&lt;br /&gt;
   8       pred ml_backend.ml_code_gen.ml_gen_local_var_decls/6-0 (det) (ml_code_gen.m:1392)&lt;br /&gt;
   9       pred ml_backend.ml_code_gen.ml_gen_goal/7-0 (det) (ml_code_gen.m:611)&lt;br /&gt;
  10       pred ml_backend.ml_proc_gen.ml_gen_proc_body/10-0 (det) (ml_proc_gen.m:1688)&lt;br /&gt;
  11       pred ml_backend.ml_proc_gen.ml_gen_proc/11-0 (det) (ml_proc_gen.m:620)&lt;br /&gt;
  12       pred list.foldl3/8-0 (det) (list.m:3556)&lt;br /&gt;
  13       pred ml_backend.ml_proc_gen.ml_gen_scc_code/10-0 (det) (ml_proc_gen.m:322)&lt;br /&gt;
  14       pred ml_backend.ml_proc_gen.ml_gen_scc/12-0 (det) (ml_proc_gen.m:227)&lt;br /&gt;
  15       pred ml_backend.ml_proc_gen.ml_gen_sccs/12-0 (det) (ml_proc_gen.m:211)&lt;br /&gt;
  16       pred ml_backend.ml_proc_gen.ml_gen_preds/9-0 (det) (ml_proc_gen.m:121)&lt;br /&gt;
  17       pred ml_backend.ml_top_gen.ml_code_gen/6-0 (det) (ml_top_gen.m:84)&lt;br /&gt;
  18       pred top_level.mercury_compile_mlds_back_end.mlds_backend/8-0 (det) (mercury_compile_mlds_back_end.m:128)&lt;br /&gt;
  19       pred top_level.mercury_compile_main.after_front_end_passes/13-0 (det) (mercury_compile_main.m:1930)&lt;br /&gt;
  20       pred top_level.mercury_compile_main.process_augmented_module/14-0 (det) (mercury_compile_main.m:1756)&lt;br /&gt;
  21       pred top_level.mercury_compile_main.augment_and_process_module/15-0 (det) (mercury_compile_main.m:1646)&lt;br /&gt;
  22       pred list.map_foldl3/9-0 (det) (list.m:3892)&lt;br /&gt;
  23       pred top_level.mercury_compile_main.augment_and_process_all_submodules/15-0 (det) (mercury_compile_main.m:1588)&lt;br /&gt;
  24       pred top_level.mercury_compile_main.read_augment_and_process_module_ok/13-0 (det) (mercury_compile_main.m:1420)&lt;br /&gt;
  25       pred top_level.mercury_compile_main.read_augment_and_process_module/11-0 (det) (mercury_compile_main.m:1362)&lt;br /&gt;
  26       pred top_level.mercury_compile_main.do_process_compiler_arg/10-0 (det) (mercury_compile_main.m:1138)&lt;br /&gt;
  27       pred top_level.mercury_compile_main.setup_and_process_compiler_arg/14-0 (det) (mercury_compile_main.m:1010)&lt;br /&gt;
  28       pred top_level.mercury_compile_main.setup_and_process_compiler_cmd_line_args/16-0 (det) (mercury_compile_main.m:929)&lt;br /&gt;
  29       pred top_level.mercury_compile_main.do_op_mode_args/13-0 (det) (mercury_compile_main.m:742)&lt;br /&gt;
  30       pred top_level.mercury_compile_main.do_op_mode/12-0 (det) (mercury_compile_main.m:577)&lt;br /&gt;
  31       pred top_level.mercury_compile_main.main_after_setup/7-0 (det) (mercury_compile_main.m:532)&lt;br /&gt;
  32       pred top_level.mercury_compile_main.real_main_after_expansion/3-0 (det) (mercury_compile_main.m:276)&lt;br /&gt;
  33       pred top_level.mercury_compile_main.real_main/2-0 (det) (mercury_compile_main.m:138)&lt;br /&gt;
  34       pred mercury_compile.main/2-0 (det) (mercury_compile.m:32)]]></description><category>Bug</category><pubDate>Mon, 04 Sep 2023 15:05:07 +1000</pubDate><guid>https://bugs.mercurylang.org/view.php?id=563</guid><comments>https://bugs.mercurylang.org/view.php?id=563#bugnotes</comments></item><item><title>0000565: Installed mmake cannot build programs</title><author></author><link>https://bugs.mercurylang.org/view.php?id=565</link><description><![CDATA[Attempting to build hello word, using the mmake from an installed compiler results in:&lt;br /&gt;
&lt;br /&gt;
    gmake: *** No rule to make target `builtin.int', needed by `hello.c_date'.  Stop.&lt;br /&gt;
&lt;br /&gt;
This appears to be occurring as far back as rotd-2023-07-01 (which is the oldest compiler I have&lt;br /&gt;
installed on my system).]]></description><category>Bug</category><pubDate>Mon, 04 Sep 2023 14:07:04 +1000</pubDate><guid>https://bugs.mercurylang.org/view.php?id=565</guid><comments>https://bugs.mercurylang.org/view.php?id=565#bugnotes</comments></item><item><title>0000494: hard_coded/nonascii fails on Windows</title><author></author><link>https://bugs.mercurylang.org/view.php?id=494</link><description><![CDATA[hard_coded/nonascii fails on Windows (mingw64-{32,64},MSVC); it outputs &quot;premature EOF&quot; for most of the output.]]></description><category>Bug</category><pubDate>Wed, 02 Aug 2023 11:11:03 +1000</pubDate><guid>https://bugs.mercurylang.org/view.php?id=494</guid><comments>https://bugs.mercurylang.org/view.php?id=494#bugnotes</comments></item><item><title>0000162: No compiler error for a mode involving an instantation state that doesn't match the argument type.</title><author></author><link>https://bugs.mercurylang.org/view.php?id=162</link><description><![CDATA[In the following code I expect to receive a compiler error telling me that the instantiation state that I'm trying to use is incorrect for the type that I'm using.&lt;br /&gt;
&lt;br /&gt;
If the body of the predicate is more detailed and for example uses the empty list for the head variable then the compiler complains that the empty list doesn't match the instantiation state for the some_type type.&lt;br /&gt;
&lt;br /&gt;
This is reproducible on taura (Linux x86-64, Mercury version rotd-2010-08-22, gcc (Ubuntu 4.4.1-4ubuntu9) 4.4.1 with default compilation options (asm_fast.gc)]]></description><category>Bug</category><pubDate>Tue, 11 Oct 2022 16:43:53 +1100</pubDate><guid>https://bugs.mercurylang.org/view.php?id=162</guid><comments>https://bugs.mercurylang.org/view.php?id=162#bugnotes</comments></item><item><title>0000151: Incorrect documentation for string.unsafe_set_char</title><author></author><link>https://bugs.mercurylang.org/view.php?id=151</link><description><![CDATA[James Cussens found that the documentation for this standard library predicate and function doesn't match the implementation.  The documentation says that it is a constant time operation but it involves a strcpy.&lt;br /&gt;
&lt;br /&gt;
The unsafe part of the name says that there is no bounds check and that a strlen call isn't performed.]]></description><category>Bug</category><pubDate>Tue, 11 Oct 2022 16:35:47 +1100</pubDate><guid>https://bugs.mercurylang.org/view.php?id=151</guid><comments>https://bugs.mercurylang.org/view.php?id=151#bugnotes</comments></item></channel></rss>
