File fail.hs:
import Data.Word
import Data.Binary.Put
import qualified Data.ByteString.Lazy as B
main = B.putStrLn (runPut (putWord8 0x32))
nick@frost ~/P/growlnet> ghc -o fail fail.hs --make -O ; ./fail
Linking fail ...
unknown scattered relocation type 4
unknown scattered relocation type 4
unknown scattered relocation type 4
unknown scattered relocation type 4
unknown scattered relocation type 4
unknown scattered relocation type 4
unknown scattered relocation type 4
unknown scattered relocation type 4
unknown scattered relocation type 4
unknown scattered relocation type 4
unknown scattered relocation type 4
unknown scattered relocation type 4
unknown scattered relocation type 4
unknown scattered relocation type 4
unknown scattered relocation type 4
unknown scattered relocation type 4
unknown scattered relocation type 4
unknown scattered relocation type 4
unknown scattered relocation type 4
unknown scattered relocation type 4
unknown scattered relocation type 4
unknown scattered relocation type 4
unknown scattered relocation type 4
unknown scattered relocation type 4
unknown scattered relocation type 4
unknown scattered relocation type 4
unknown scattered relocation type 4
unknown scattered relocation type 4
unknown scattered relocation type 4
unknown scattered relocation type 4
unknown scattered relocation type 4
unknown scattered relocation type 4
unknown scattered relocation type 4
unknown scattered relocation type 4
unknown scattered relocation type 4
unknown scattered relocation type 4
unknown scattered relocation type 4
unknown scattered relocation type 4
unknown scattered relocation type 4
unknown scattered relocation type 4
unknown scattered relocation type 4
fish: Job 1, “./fail” terminated by signal SIGSEGV (Address boundary error)
(note, 'fish' is the shell I use... http://fishshell.org/)
Also fails without -O, with -fasm, and with -fvia-c
The GHC I'm using was built by scsibug, available at http://scsibug.com/
on #haskell, everyone else reports that this code works correctly for them (different architectures)
-Nick Burlett
nickburlett@mac.com