| View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||
| 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 | ||||||
| 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. | ||||||||
| Attached Files |
| ||||||||


