#8083: setNumCapabilities broken in HEAD
--------------------------+------------------------------------------------
Reporter: parcs | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: | Version: 7.7
Runtime System | Operating System: Unknown/Multiple
Keywords: | Type of failure: Incorrect result at runtime
Architecture: | Test Case:
Unknown/Multiple | Blocking:
Difficulty: |
Unknown |
Blocked By: |
Related Tickets: |
--------------------------+------------------------------------------------
{{{
#!haskell
import GHC.Conc
import Control.Monad
main :: IO ()
main = do
n <- getNumCapabilities
when (n == 1) $ setNumCapabilities 2
print ()
}}}
One would expect this program to print () just once, but when compiled
with -O or -O2 it prints () repeatedly and indefinitely!
This doesn't happen on GHC 7.6.2 or 7.4.1, only on HEAD.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8083>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
ghc-tickets mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/ghc-tickets