summaryrefslogtreecommitdiff
path: root/testsuite/tests/driver
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/driver')
-rw-r--r--testsuite/tests/driver/T22048.hs11
-rw-r--r--testsuite/tests/driver/all.T1
2 files changed, 12 insertions, 0 deletions
diff --git a/testsuite/tests/driver/T22048.hs b/testsuite/tests/driver/T22048.hs
new file mode 100644
index 0000000000..d8a1c07c02
--- /dev/null
+++ b/testsuite/tests/driver/T22048.hs
@@ -0,0 +1,11 @@
+module T22048 where
+
+{-# NOINLINE g #-}
+g :: Bool -> Bool
+g = not
+
+-- With -fomit-interface-pragmas these rules should not make it into interface files.
+{-# RULES
+"imported_rule" [~1] forall xs. map g xs = []
+"local_rule" [~1] forall . g True = False
+#-}
diff --git a/testsuite/tests/driver/all.T b/testsuite/tests/driver/all.T
index 5603354282..6a0932e9b0 100644
--- a/testsuite/tests/driver/all.T
+++ b/testsuite/tests/driver/all.T
@@ -312,3 +312,4 @@ test('T21866', normal, multimod_compile, ['T21866','-no-link'])
test('T21349', extra_files(['T21349']), makefile_test, [])
test('T21869', [normal, when(unregisterised(), skip)], makefile_test, [])
test('T22044', normal, makefile_test, [])
+test('T22048', [only_ways(['normal']), grep_errmsg("_rule")], compile, ["-O -fomit-interface-pragmas -ddump-simpl"])