diff --git a/testsuite/tests/ghci/T24327/T24327.hs b/testsuite/tests/ghci/T24327/T24327.hs
new file mode 100644
index 0000000000000000000000000000000000000000..544578ca963c9fd57e3c5d2033583011e0b4a444
--- /dev/null
+++ b/testsuite/tests/ghci/T24327/T24327.hs
@@ -0,0 +1,6 @@
+module T24327 where
+import T24327A
+
+bar :: Int
+bar = foo1 'a' 1
+
diff --git a/testsuite/tests/ghci/T24327/T24327.script b/testsuite/tests/ghci/T24327/T24327.script
new file mode 100644
index 0000000000000000000000000000000000000000..b0773fb9bbd37fcc1d24bb3171ca4606cbde9f2c
--- /dev/null
+++ b/testsuite/tests/ghci/T24327/T24327.script
@@ -0,0 +1 @@
+:l T24327
diff --git a/testsuite/tests/ghci/T24327/T24327A.hs b/testsuite/tests/ghci/T24327/T24327A.hs
new file mode 100644
index 0000000000000000000000000000000000000000..ca57be5eadf09b00bff39ce78494b0949c4bd28c
--- /dev/null
+++ b/testsuite/tests/ghci/T24327/T24327A.hs
@@ -0,0 +1,10 @@
+module T24327A where
+
+{-# INLINE foo1 #-}
+foo1 :: Char -> Int -> Int
+foo1 _  y = bar1 y
+
+{-# INLINE bar1 #-}
+bar1 :: Int -> Int
+bar1 x = length [1..10] + x
+
diff --git a/testsuite/tests/ghci/T24327/all.T b/testsuite/tests/ghci/T24327/all.T
new file mode 100644
index 0000000000000000000000000000000000000000..28fa79c10163cda9337ccf48078bb7791b609c51
--- /dev/null
+++ b/testsuite/tests/ghci/T24327/all.T
@@ -0,0 +1 @@
+test('T24327', [extra_ways(['ghci-ext-prof']), only_ways(['ghci-ext-prof']), extra_files(['T24327A.hs', 'T24327.hs']), extra_hc_opts('-fno-unoptimized-core-for-interpreter -O')], ghci_script, ['T24327.script'])