Commit 072abebb authored by Peter Trommler's avatar Peter Trommler 🥁 Committed by Austin Seipp

Add regression test for #10110.

Module C imports a from Module A and b from module B. B does not
import anything from A. So if ld is configured to drop DT_NEEDED
tags for libraries it does not depend on no DT_NEEDED tag for the
temporary shared object containing module A is recorded in the temp
SO containing module B. This leads to an undefined symbol when
linking the temp SO for module C.

Fixes #10110.

Reviewed By: austin

Differential Revision:

GHC Trac Issues: #10110

(cherry picked from commit 85bf9e49)
parent a6d9c3a5
:set -fobject-code
:load T10110A T10110B T10110C
module T10110A (a) where
{-# NOINLINE a #-}
a :: Int
a = 3
module T10110B (b) where
b :: Int
b = 5
module T10110C (c) where
import T10110A (a)
import T10110B (b)
c :: Int
c = a+b
......@@ -208,3 +208,4 @@ test('T9878b',
ghci_script, ['T9878b.script'])
test('T10321', normal, ghci_script, ['T10321.script'])
test('T10110', normal, ghci_script, ['T10110.script'])
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment