#7215: miscompilation due to broken interface hash -----------------------------------------+---------------------------------- Reporter: akio | Owner: Type: bug | Status: new Priority: normal | Component: Compiler Version: 7.4.2 | Keywords: Os: Linux | Architecture: x86_64 (amd64) Failure: Incorrect result at runtime | Testcase: Blockedby: | Blocking: Related: | -----------------------------------------+---------------------------------- The following script should print '!MyFalse !MyTrue' but it prints '!MyFalse !MyFalse'. (warning: it removes files in the current directory)
{{{ rm -f main main.o main.hi MyBool.hi MyBool.o Foo.hi Foo.o ghc=ghc echo 'module MyBool where data MyBool = MyFalse | MyTrue deriving Show' > MyBool.hs echo 'module Foo where import MyBool; foo = MyFalse' > Foo.hs echo 'import Foo; main = print foo' > main.hs $ghc -c -O2 MyBool.hs $ghc -c -O2 Foo.hs $ghc -O2 main.hs ./main echo 'module Foo where import MyBool; foo = MyTrue' > Foo.hs $ghc -c -O2 Foo.hs $ghc -O2 main.hs ./main }}} The issue seems to be that the second version of Foo.hs gets the same interface hash as the old one. This stops GHC from updating Foo.hi, which contains an outdated unfolding. -- Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/7215> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler _______________________________________________ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs