
#16197: Strictness is not preserved under -O1
-------------------------------------+-------------------------------------
Reporter: alang9 | Owner: (none)
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 8.4.1
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
Type of failure: Incorrect result | Unknown/Multiple
at runtime | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by simonpj):
I can reproduce this with 8.6, but not with HEAD, so I think perhaps it is
fixed. Hooray.
Indeed we have made some recent changes to the handling of strictness on
data constructors:
{{{
commit d77501cd5b9060e38acd50e11e0c5aae89d75b65
Author: Simon Peyton Jones for Int#
rather than for Int
commit d549c081f19925dd0e4c70d45bded0497c649d49
Author: Ben Gamari m,
}}}
I had previously regarded these patches as clean-ups, improving the
generated code, rather than actual bug fixes. So your example is very
interesting: it shows that the "clean-up" actually fixed a bug.
Ben/Omer: could you add comment:4 as a regression test?
--
Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/16197#comment:5
GHC http://www.haskell.org/ghc/
The Glasgow Haskell Compiler