Test case for indirect dependencies in ghci linker (#10322)
authorReid Barton <rwbarton@gmail.com>
Wed, 15 Apr 2015 20:46:47 +0000 (16:46 -0400)
committerReid Barton <rwbarton@gmail.com>
Sat, 18 Apr 2015 17:36:58 +0000 (13:36 -0400)
testsuite/tests/ghci/scripts/T10322.script [new file with mode: 0644]
testsuite/tests/ghci/scripts/T10322.stdout [new file with mode: 0644]
testsuite/tests/ghci/scripts/T10322A.hs [new file with mode: 0644]
testsuite/tests/ghci/scripts/T10322B.hs [new file with mode: 0644]
testsuite/tests/ghci/scripts/T10322C.hs [new file with mode: 0644]
testsuite/tests/ghci/scripts/all.T

diff --git a/testsuite/tests/ghci/scripts/T10322.script b/testsuite/tests/ghci/scripts/T10322.script
new file mode 100644 (file)
index 0000000..75f2a39
--- /dev/null
@@ -0,0 +1,5 @@
+:set -fobject-code
+:load T10322A T10322B T10322C
+T10322A.a
+T10322B.b
+T10322C.c
diff --git a/testsuite/tests/ghci/scripts/T10322.stdout b/testsuite/tests/ghci/scripts/T10322.stdout
new file mode 100644 (file)
index 0000000..de9da6d
--- /dev/null
@@ -0,0 +1,3 @@
+3
+4
+7
diff --git a/testsuite/tests/ghci/scripts/T10322A.hs b/testsuite/tests/ghci/scripts/T10322A.hs
new file mode 100644 (file)
index 0000000..ba01fd2
--- /dev/null
@@ -0,0 +1,4 @@
+module T10322A (a) where
+{-# NOINLINE a #-}
+a :: Int
+a = 3
diff --git a/testsuite/tests/ghci/scripts/T10322B.hs b/testsuite/tests/ghci/scripts/T10322B.hs
new file mode 100644 (file)
index 0000000..aa0b73a
--- /dev/null
@@ -0,0 +1,4 @@
+module T10322B (b) where
+import T10322A (a)
+b :: Int
+b = a+1
diff --git a/testsuite/tests/ghci/scripts/T10322C.hs b/testsuite/tests/ghci/scripts/T10322C.hs
new file mode 100644 (file)
index 0000000..b6ad6e9
--- /dev/null
@@ -0,0 +1,5 @@
+module T10322C (c) where
+import T10322A (a)
+import T10322B (b)
+c :: Int
+c = a+b
index b97eede..01de663 100755 (executable)
@@ -207,3 +207,5 @@ test('T9878b',
       extra_clean(['T9878b.hi','T9878b.o'])],
     ghci_script, ['T9878b.script'])
 test('T10122', normal, ghci_script, ['T10122.script'])
+test('T10322', when(opsys('darwin'), expect_broken(10322)),
+    ghci_script, ['T10322.script'])