#4209: LLVM: Vector code segfaults under OSX
------------------------+---------------------------------------------------
Reporter: dterei | Owner: dterei
Type: bug | Status: new
Priority: normal | Component: Compiler (LLVM)
Version: 6.13 | Keywords: osx tntc llvm segfault
Os: MacOS X | Testcase:
Architecture: x86 | Failure: Runtime crash
------------------------+---------------------------------------------------
The following code:
{{{
import Data.Vector.Unboxed as V
main = foo 0 `seq` return ()
foo :: Int -> Vector Int
foo n = V.zipWith (\i j -> if i == j then 0 else 1)
(V.replicate n 0) (V.enumFromTo 0 (n - 1))
}}}
Segfaults under OSX when compiled with GHC HEAD with the following flags:
{{{
ghc -fllvm -O2 -optlc-O3 --make v.hs
}}}
The problem only occurs when ghc is set to -O2 and llc is set to -O3. (opt
tools optimisation level doesn't seem to matter).
The problem also only occurs when TNTC is enabled.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/4209>
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