
#11312: GHC inlining primitive string literals can affect program output -------------------------------------+------------------------------------- Reporter: RyanGlScott | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.10.3 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Incorrect result | Unknown/Multiple at runtime | Test Case: Blocked By: | Blocking: Related Tickets: #11292 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by simonpj): Anyone who uses `eqAddr#` to compare string literals is asking for trouble. Really it should be harder to do. `eqAddr#` is a respectable function, but it is NOT respectable that `"foo"# :: Addr#`. We should have `String#`, and operations to compare the strings. Meanwhile, see #8472 for a better approach to sharing string literals. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11312#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler