Mercury Bugs - mercury | |||||
| View Issue Details | |||||
| ID | Project | Category | View Status | Date Submitted | Last Update |
| 0000221 | mercury | Bug | public | 2011-10-11 10:09 | 2011-10-24 16:19 |
| Reporter | maclarty | ||||
|---|---|---|---|---|---|
| Assigned To | maclarty | ||||
| Priority | normal | Severity | major | Reproducibility | always |
| Status | resolved | Resolution | fixed | ||
| Platform | OS | OS Version | |||
| Product Version | |||||
| Target Version | Fixed in Version | ||||
| Summary | 0000221: ho specialization bug | ||||
| Description | The attached program produces the wrong output when compiled with --optimize-higher-order. It should output "ho2", but instead outputs "ho1". In do_stuff it is specializing P to ho1, when it shouldn't. Here is the relevant bit of the hlds dump for stage 135: :- mode do_stuff((builtin.in), (builtin.di), (builtin.uo)) is det. bug.do_stuff(Maybe, STATE_VARIABLE_IO_0, STATE_VARIABLE_IO) :- ( % cannot_fail switch on `Maybe' % Maybe has functor maybe.no/0 P = bug.ho1 ; % Maybe has functor maybe.yes/1 P = bug.get_ho2 ), bug.ho1(STATE_VARIABLE_IO_0, STATE_VARIABLE_IO). | ||||
| Tags | No tags attached. | ||||
| Relationships | |||||
| Attached Files | https://bugs.mercurylang.org/file_download.php?file_id=132&type=bug | ||||
| There are no notes attached to this issue. |
| Issue History | |||||
| Date Modified | Username | Field | Change | ||
|---|---|---|---|---|---|
| 2011-10-11 10:09 | New Issue | ||||
| 2011-10-11 10:09 | File Added: bug.m | ||||
| 2011-10-24 16:19 | Status | new => assigned | |||
| 2011-10-24 16:19 | Assigned To | => maclarty | |||
| 2011-10-24 16:19 | Status | assigned => resolved | |||
| 2011-10-24 16:19 | Resolution | open => fixed | |||