
#15338: ghc-pkg misbehaves after possible miscompilation on m68k and sh4 -------------------------------------+------------------------------------- Reporter: glaubitz | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: 8.6.1 Component: Compiler | Version: 8.4.3 Resolution: | Keywords: Operating System: Linux | Architecture: m68k Type of failure: Incorrect result | Test Case: at runtime | Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by slyfox): Here is the minimal reproducer: {{{#!hs -- a.hs import System.IO main = do hSetBuffering stdout (BlockBuffering Nothing) hPutStrLn stdout "hello" }}} {{{ $ ghc --make a.hs -O1 -dynamic $ ./a <no output> }}} Confirmed locally that: - broken: '''sh4''' and '''m68k''' - seem to work: '''x86_64''', '''mipsn32''', '''powerpc''', '''powerpc64''', '''sparc''' I have not got to the bottom of the bug yet but on the way there. Somehow flushStdHandles fails to flush stdout when (and only when) in full buffered mode. A few observations: - the trigger needs both '''-O1' and '''-dynamic''' - both '''sh4''' and '''m68k''' are arches with 2-byte instruction width I'll keep debugging. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15338#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler