[GHC] #14708: GHC panics when linking with an archive and using an annotation
GHC
ghc-devs at haskell.org
Tue Jan 23 16:18:29 UTC 2018
#14708: GHC panics when linking with an archive and using an annotation
-------------------------------------+-------------------------------------
Reporter: tchajed | Owner: (none)
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 8.2.2
Keywords: | Operating System: Unknown/Multiple
Architecture: x86_64 | Type of failure: Compile-time
(amd64) | crash or panic
Test Case: | Blocked By:
Blocking: | Related Tickets:
Differential Rev(s): | Wiki Page:
-------------------------------------+-------------------------------------
GHC panics when compiling code with an annotation and linking with an
archive (a `.a` file). I think this is the same as #9438, but I have a
really simple test case consisting of the following two files:
{{{#!c
// add.c
int add2(int x, int y) { return x + y; }
}}}
{{{#!hs
-- app.hs
{-# ANN module () #-}
main :: IO ()
main = return ()
}}}
First I make an archive:
{{{
$ gcc -c add.c -o add.o
$ ar libadd.a add.o
}}}
And then the following fails:
{{{
$ ghc -ladd -L. app.hs
[1 of 1] Compiling Main ( app.hs, app.o )
ghc: panic! (the 'impossible' happened)
(GHC version 8.2.2 for x86_64-apple-darwin):
Loading archives not supported
Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug
make: *** [app] Error 1
}}}
The attached tar.gz has these source files and a Makefile to run the
above. I've tested it on OS X 10.11 and Linux, both with GHC 8.2.2, and
the behavior is the same.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14708>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list