
#15696: Derived Ord instance for enumerations with more than 8 elements seems to be incorrect -------------------------------------+------------------------------------- Reporter: mrkkrp | Owner: osa1 Type: bug | Status: patch Priority: highest | Milestone: 8.6.2 Component: Compiler | Version: 8.6.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Incorrect result | Unknown/Multiple at runtime | Test Case: Blocked By: | Blocking: Related Tickets: #14677, #15155 | Differential Rev(s): Phab:D5196, Wiki Page: | Phab:D5201 -------------------------------------+------------------------------------- Comment (by osa1):
That is indeed a mystery. Is the code you are showing the output of the simplifier?
The code I showed is the input of `FloatIn` when a file is compiled with `-O`. The full command to reproduce (after building stage 1): {{{ "inplace/bin/ghc-stage1" -hisuf hi -osuf o -hcsuf hc -static -O0 -H64m -Wall -this-unit-id ghc-heap-8.7 -hide-all-packages -i -ilibraries /ghc-heap/. -ilibraries/ghc-heap/dist-install/build -Ilibraries/ghc-heap /dist-install/build -ilibraries/ghc-heap/dist-install/build/./autogen -Ilibraries/ghc-heap/dist-install/build/./autogen -Ilibraries/ghc-heap/. -optP-include -optPlibraries/ghc-heap/dist- install/build/./autogen/cabal_macros.h -package-id base-4.12.0.0 -package- id ghc-prim-0.5.3 -package-id rts -Wall -XHaskell2010 -XNoImplicitPrelude -O -no-user-package-db -rtsopts -Wno-deprecated-flags -Wnoncanonical-monad-instances -odir libraries/ghc-heap/dist- install/build -hidir libraries/ghc-heap/dist-install/build -stubdir libraries/ghc-heap/dist-install/build -dynamic-too -c libraries/ghc- heap/./GHC/Exts/Heap/ClosureTypes.hs -o libraries/ghc-heap/dist- install/build/GHC/Exts/Heap/ClosureTypes.o -dyno libraries/ghc-heap/dist- install/build/GHC/Exts/Heap/ClosureTypes.dyn_o }}}
Can you give instructions to reproduce (maybe make a wip/ branch)?
Committed code to `wip/T15696`. Note that -ddump-simpl-iterations is not printing Core right before `FloatIn` so you need some extra prints to be able to trace this. I'm currently using [https://gist.githubusercontent.com/osa1/9755f7d7238a3757cfee0b37a183a6d8/raw... this] patch for that. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15696#comment:72 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler