
#8547: Data.Vector.foldl' hangs GHC indefinitely with -O2 -----------------------------------+--------------------------------------- Reporter: blitzcode | Owner: Type: bug | Status: new Priority: high | Milestone: Component: Compiler | Version: 7.6.3 Keywords: hang vector | Operating System: Unknown/Multiple fold' | Type of failure: Compile-time crash Architecture: | Test Case: Unknown/Multiple | Blocking: Difficulty: Unknown | Blocked By: | Related Tickets: | -----------------------------------+--------------------------------------- Running 'ghc -O2 -fforce-recomp -c Bug.hs' on the following {{{#!haskell module Bug where import qualified Data.Vector as V data Tree = Empty | Node !(V.Vector Tree) f :: k -> Tree -> Tree f k' (Node ch) = head $ V.foldl' (\u t' -> case t' of Empty -> u; _ -> t' : u) [] ch }}} will hang forever (or at least >5m). Builds fine with -O1 / V.foldl. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8547 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler