#5614: recompilation bug with -O
---------------------------------+------------------------------------------
Reporter: gmi001 | Owner:
Type: bug | Status: new
Priority: normal | Component: Compiler
Version: 7.2.1 | Keywords: recompilation
Testcase: | Blockedby:
Os: Unknown/Multiple | Blocking:
Architecture: Unknown/Multiple | Failure: Incorrect result at runtime
---------------------------------+------------------------------------------
Recompilation with -O should also rebuild Main.hs in the attached test
application consisting of Main.hs and X.hs.
Test case:
1) build the app with GHC --make -O Main.hs
2) run Main (output = B)
3) change and save in X.hs
x = D { f = B }
to
x = D { f = A }
4) rebuild the app with GHC --make -O Main.hs (recompiles only X.hs)
5) run Main (unexpected output = B)
6) force recompilation of both X.hs and Main.hs
7) run Main (output = A)
The bug is in -O.
A similar test with f :: String instead of f :: D2 runs without problems.
Problem is tested positive on WIN GHC 7.0.2, OpenSuse GHC 6.12.3, Mac OS X
GHC 7.0.3 and GHC 7.2.1 (MAC?).
for more detail see http://sourceforge.net/apps/trac/ampersand/ticket/172.
the closed #1959 and #3166 describe similar problems.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/5614>
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