summaryrefslogtreecommitdiff
path: root/testsuite/tests/simplCore/should_run
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/simplCore/should_run')
-rw-r--r--testsuite/tests/simplCore/should_run/T23056.hs10
-rw-r--r--testsuite/tests/simplCore/should_run/T23056.script2
-rw-r--r--testsuite/tests/simplCore/should_run/T23056.stdout1
-rw-r--r--testsuite/tests/simplCore/should_run/all.T1
4 files changed, 14 insertions, 0 deletions
diff --git a/testsuite/tests/simplCore/should_run/T23056.hs b/testsuite/tests/simplCore/should_run/T23056.hs
new file mode 100644
index 0000000000..abf3d7a7be
--- /dev/null
+++ b/testsuite/tests/simplCore/should_run/T23056.hs
@@ -0,0 +1,10 @@
+module Main where
+
+fun :: IO ()
+fun = pure ()
+{-# noinline fun #-}
+
+{-# rules "fun" fun = putStrLn "fun" #-}
+
+main :: IO ()
+main = fun
diff --git a/testsuite/tests/simplCore/should_run/T23056.script b/testsuite/tests/simplCore/should_run/T23056.script
new file mode 100644
index 0000000000..fdf0d3b722
--- /dev/null
+++ b/testsuite/tests/simplCore/should_run/T23056.script
@@ -0,0 +1,2 @@
+:load T23056
+main
diff --git a/testsuite/tests/simplCore/should_run/T23056.stdout b/testsuite/tests/simplCore/should_run/T23056.stdout
new file mode 100644
index 0000000000..3df46ad190
--- /dev/null
+++ b/testsuite/tests/simplCore/should_run/T23056.stdout
@@ -0,0 +1 @@
+fun
diff --git a/testsuite/tests/simplCore/should_run/all.T b/testsuite/tests/simplCore/should_run/all.T
index 7348e1015a..bfd5fa6261 100644
--- a/testsuite/tests/simplCore/should_run/all.T
+++ b/testsuite/tests/simplCore/should_run/all.T
@@ -112,3 +112,4 @@ test('T22998', normal, compile_and_run, ['-O0 -fspecialise -dcore-lint'])
test('T23184', normal, compile_and_run, ['-O'])
test('T23134', normal, compile_and_run, ['-O0 -fcatch-nonexhaustive-cases'])
test('T23289', normal, compile_and_run, [''])
+test('T23056', [only_ways(['ghci']), extra_hc_opts('-fno-unoptimized-core-for-interpreter -O')], ghci_script, ['T23056.script'])