[commit: ghc] ghc-7.10: Add regression test for #10110. (072abeb)

git at git.haskell.org git at git.haskell.org
Tue May 19 09:21:46 UTC 2015


Repository : ssh://git@git.haskell.org/ghc

On branch  : ghc-7.10
Link       : http://ghc.haskell.org/trac/ghc/changeset/072abebbccbe87f153ae3e8593388d07d169cd09/ghc

>---------------------------------------------------------------

commit 072abebbccbe87f153ae3e8593388d07d169cd09
Author: Peter Trommler <ptrommler at acm.org>
Date:   Tue May 19 01:21:09 2015 -0500

    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: https://phabricator.haskell.org/D895
    
    GHC Trac Issues: #10110
    
    (cherry picked from commit 85bf9e49f5ab4e0681eeda2549dbd4b5faf3ef7f)


>---------------------------------------------------------------

072abebbccbe87f153ae3e8593388d07d169cd09
 testsuite/tests/ghci/scripts/T10110.script                           | 5 +++++
 .../should_run/tcrun023.stdout => ghci/scripts/T10110.stdout}        | 1 +
 testsuite/tests/ghci/scripts/{T8696A.hs => T10110A.hs}               | 2 +-
 testsuite/tests/ghci/scripts/T10110B.hs                              | 3 +++
 testsuite/tests/ghci/scripts/T10110C.hs                              | 5 +++++
 testsuite/tests/ghci/scripts/all.T                                   | 1 +
 6 files changed, 16 insertions(+), 1 deletion(-)

diff --git a/testsuite/tests/ghci/scripts/T10110.script b/testsuite/tests/ghci/scripts/T10110.script
new file mode 100644
index 0000000..df67c30
--- /dev/null
+++ b/testsuite/tests/ghci/scripts/T10110.script
@@ -0,0 +1,5 @@
+:set -fobject-code
+:load T10110A T10110B T10110C
+T10110A.a
+T10110B.b
+T10110C.c
diff --git a/testsuite/tests/typecheck/should_run/tcrun023.stdout b/testsuite/tests/ghci/scripts/T10110.stdout
similarity index 66%
copy from testsuite/tests/typecheck/should_run/tcrun023.stdout
copy to testsuite/tests/ghci/scripts/T10110.stdout
index 2050fde..21cc9a8 100644
--- a/testsuite/tests/typecheck/should_run/tcrun023.stdout
+++ b/testsuite/tests/ghci/scripts/T10110.stdout
@@ -1,2 +1,3 @@
+3
 5
 8
diff --git a/testsuite/tests/ghci/scripts/T8696A.hs b/testsuite/tests/ghci/scripts/T10110A.hs
similarity index 57%
copy from testsuite/tests/ghci/scripts/T8696A.hs
copy to testsuite/tests/ghci/scripts/T10110A.hs
index 465af37..8482e7f 100644
--- a/testsuite/tests/ghci/scripts/T8696A.hs
+++ b/testsuite/tests/ghci/scripts/T10110A.hs
@@ -1,4 +1,4 @@
-module T8696A (a) where
+module T10110A (a) where
 {-# NOINLINE a #-}
 a :: Int
 a = 3
diff --git a/testsuite/tests/ghci/scripts/T10110B.hs b/testsuite/tests/ghci/scripts/T10110B.hs
new file mode 100644
index 0000000..65cfc7e
--- /dev/null
+++ b/testsuite/tests/ghci/scripts/T10110B.hs
@@ -0,0 +1,3 @@
+module T10110B (b) where
+b :: Int
+b = 5
diff --git a/testsuite/tests/ghci/scripts/T10110C.hs b/testsuite/tests/ghci/scripts/T10110C.hs
new file mode 100644
index 0000000..7069207
--- /dev/null
+++ b/testsuite/tests/ghci/scripts/T10110C.hs
@@ -0,0 +1,5 @@
+module T10110C (c) where
+import T10110A (a)
+import T10110B (b)
+c :: Int
+c = a+b
diff --git a/testsuite/tests/ghci/scripts/all.T b/testsuite/tests/ghci/scripts/all.T
index 270e3ae..69c5254 100755
--- a/testsuite/tests/ghci/scripts/all.T
+++ b/testsuite/tests/ghci/scripts/all.T
@@ -208,3 +208,4 @@ test('T9878b',
     ghci_script, ['T9878b.script'])
 
 test('T10321', normal, ghci_script, ['T10321.script'])
+test('T10110', normal, ghci_script, ['T10110.script'])



More information about the ghc-commits mailing list