Opened 5 months ago

Closed 5 months ago

#8547 closed bug (duplicate)

Data.Vector.foldl' hangs GHC indefinitely with -O2

Reported by: blitzcode Owned by:
Priority: high Milestone:
Component: Compiler Version: 7.6.3
Keywords: hang vector fold' Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: Compile-time crash Difficulty: Unknown
Test Case: Blocked By:
Blocking: Related Tickets:

Description

Running 'ghc -O2 -fforce-recomp -c Bug.hs' on the following

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.

Change History (1)

comment:1 Changed 5 months ago by monoidal

  • Resolution set to duplicate
  • Status changed from new to closed

This is fixed in HEAD (#5550). Thanks for the report.

Note: See TracTickets for help on using tickets.