#5658: Strict bindings are wrongly floated out of case alternatives.
---------------------------------+------------------------------------------
Reporter: benl | Owner: benl
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.2.1
Keywords: | Os: Unknown/Multiple
Architecture: Unknown/Multiple | Failure: Runtime crash
Difficulty: | Testcase:
Blockedby: | Blocking:
Related: |
---------------------------------+------------------------------------------
Comment(by benl):
Hrm. I marked them all as `can_fail` because it's true that they can fail,
and now the function `primOpCanFail :: Name -> Bool` should return the
correct information for each primop.
If we want to say "If a primop is marked as `has_side_effects` then GHC
won't do anything different if it's also marked as `can_fail`", then this
is a property of the compiler rather than a property of the primop.
The only place I can find the `can_fail` and `has_side_effects` flags
being used is via the following function:
{{{
primOpOkForSpeculation :: PrimOp -> Bool
primOpOkForSpeculation op
= not (primOpHasSideEffects op || primOpOutOfLine op || primOpCanFail
op)
}}}
From this, it looks like the `can_fail` flag is redundant anyway. We could
replace all occurrences of `can_fail` in the primops.txt.pp file with
`has_side_effects` and still get the same result.
What do you want to do?
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/5658#comment:5>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs