[GHC] #1171: GHC generates incorrect code with -O for Haskell 98 program

GHC trac at galois.com
Sat Feb 24 16:39:49 EST 2007


#1171: GHC generates incorrect code with -O for Haskell 98 program
-------------------------+--------------------------------------------------
    Reporter:  neil      |       Owner:          
        Type:  bug       |      Status:  new     
    Priority:  normal    |   Milestone:          
   Component:  Compiler  |     Version:  6.6     
    Severity:  major     |    Keywords:          
  Difficulty:  Unknown   |    Testcase:          
Architecture:  Multiple  |          Os:  Multiple
-------------------------+--------------------------------------------------
Yhc bug 122 appears to be a GHC bug:
 http://code.google.com/p/yhc/issues/detail?id=122 , discussed here:
 http://thread.gmane.org/gmane.comp.lang.haskell.yhc/720

 To reproduce:
 Download and install Yhc two separate times, once doing "scons" to build,
 once doing "scons type=release". Follow the steps outlined in the above
 bug report with the standard version, and it gives the correct behaviour.
 Try again with the release version and it gives the wrong behaviour. GHC
 6.4.2 works fine. The difference between the two is that type=release
 builds with -O, normal doesn't.

 Changing the code slightly, by introducing "obvious" assert statements in
 Package.hs makes the bug go away. Creating reduced tests cases didn't get
 very far...

 This has been replicated on Mac and Windows with GHC 6.6. If you have any
 further questions about the code then feel free to email me or the Yhc
 list. Marking as severity=major because silently doing something different
 is about as bad as they come.

 Thanks to Thorkil for doing the detective work to track this down as far
 as GHC.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/1171>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the Glasgow-haskell-bugs mailing list