[GHC] #10531: modules that can be linked successfully when compiled with optimizations, fail to link with: multiple definition of `__stginit_ZCMain'

GHC ghc-devs at haskell.org
Thu Jun 25 18:51:03 UTC 2015


#10531: modules that can be linked successfully when compiled with optimizations,
fail to link with: multiple definition of `__stginit_ZCMain'
-------------------------------------+-------------------------------------
        Reporter:  imz               |                   Owner:
            Type:  bug               |                  Status:  new
        Priority:  normal            |               Milestone:
       Component:  Compiler          |                 Version:  7.6.1
      Resolution:                    |                Keywords:
Operating System:  Linux             |            Architecture:  x86_64
 Type of failure:  GHC rejects       |  (amd64)
  valid program                      |               Test Case:  attached
      Blocked By:                    |                Blocking:
 Related Tickets:  #437              |  Differential Revisions:
-------------------------------------+-------------------------------------

Comment (by rwbarton):

 With optimization enabled, another identifier `main4` appears in the
 interface file for A, but only when `-main-is A.main` (`ZCMain_main_info`
 is a jump to `main4`). So because of this change, a new interface file
 gets written out, which then has the correct flag hash as well.

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10531#comment:8>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list