[Hugs-bugs] internal error
ross at soi.city.ac.uk
Fri Oct 22 06:20:55 EDT 2004
On Fri, Oct 22, 2004 at 07:45:32AM +0000, fool at sdf-eu.org wrote:
> bla = (if True then (+) else (+)) 0 0
An elegant report. Here's another version:
bla = (if True then id else negate) (1::Int)
Unfortunately it seems to point at a whole class of longstanding bugs
in the peephole optimizer: it takes no account of branch targets.
(Here MKAP 1; MKAP 1 => MKAP 2, but the second MKAP was the target of
a TEST branch.) Another of these optimizations was turned off two
years ago for a similar reason, but they all seem similarly flawed.
More information about the Hugs-Bugs