fix '&stg_interp_constr_entry' FFI type to be FunPtr
authorSergei Trofimovich <siarheit@google.com>
Mon, 6 Apr 2015 10:16:30 +0000 (11:16 +0100)
committerSergei Trofimovich <siarheit@google.com>
Mon, 6 Apr 2015 10:16:30 +0000 (11:16 +0100)
commit22eecaff9db1feb7eef9ee8ed11fcef4df01b08e
treeaaa24f71c9c0dde80b7aca05bb09660523736b7d
parentc81e07063dd4f792d65f5933cfb906620d120b24
fix '&stg_interp_constr_entry' FFI type to be FunPtr

Summary:
It used to be Ptr, which is slightly incorrect.
ia64 has different representations for those types.

Found when tried to build unregisterised ghc with -flto,
GCC's link-time optimisation which happens to check
data / code declaration inconsistencies.

It our case 'stg_interp_constr_entry' is an RTS function:
   StgFunPtr f (StgFunPtr)
while '"&f" :: Ptr()' produces
   StgWordArray f[];

Signed-off-by: Sergei Trofimovich <siarheit@google.com>
Reviewers: simonmar, hvr, austin

Reviewed By: austin

Subscribers: thomie

Differential Revision: https://phabricator.haskell.org/D796
compiler/ghci/ByteCodeItbls.hs