summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--testsuite/tests/driver/Makefile23
-rw-r--r--testsuite/tests/driver/T7060.hs4
-rw-r--r--testsuite/tests/driver/all.T7
3 files changed, 34 insertions, 0 deletions
diff --git a/testsuite/tests/driver/Makefile b/testsuite/tests/driver/Makefile
index 14d1d265bd..fdb2348d17 100644
--- a/testsuite/tests/driver/Makefile
+++ b/testsuite/tests/driver/Makefile
@@ -503,3 +503,26 @@ T5198:
"$(TEST_HC)" $(TEST_HC_OPTS_NO_RECOMP) -c T5198.hs -dumpdir T5198dump -ddump-to-file -ddump-simpl
[ -f T5198dump/T5198.dump-simpl ]
+.PHONY: T7060a
+T7060a:
+ $(RM) -rf T7060dump
+ [ ! -d T7060dump ]
+ "$(TEST_HC)" $(TEST_HC_OPTS_NO_RECOMP) -O -c T7060.hs -dumpdir T7060dump -ddump-to-file -ddump-rules
+ [ -f T7060dump/T7060.dump-rules ]
+
+.PHONY: T7060b
+T7060b:
+ $(RM) -rf T7060dump
+ [ ! -d T7060dump ]
+ "$(TEST_HC)" $(TEST_HC_OPTS_NO_RECOMP) -O -c T7060.hs -dumpdir T7060dump -ddump-to-file -ddump-rule-firings
+ [ -f T7060dump/T7060.dump-rule-firings ]
+
+.PHONY: T7060c
+T7060c:
+ $(RM) -rf T7060dump
+ [ ! -d T7060dump ]
+ "$(TEST_HC)" $(TEST_HC_OPTS_NO_RECOMP) -O -c T7060.hs -dumpdir T7060dump -ddump-to-file -ddump-rule-rewrites
+ [ -f T7060dump/T7060.dump-rule-rewrites ]
+
+.PHONY: T7060
+T7060: T7060a T7060b T7060c
diff --git a/testsuite/tests/driver/T7060.hs b/testsuite/tests/driver/T7060.hs
new file mode 100644
index 0000000000..45dac515e4
--- /dev/null
+++ b/testsuite/tests/driver/T7060.hs
@@ -0,0 +1,4 @@
+main :: IO ()
+main = print (3 + 4 :: Int)
+
+{-# RULES "rule" forall xs . map id xs = xs #-}
diff --git a/testsuite/tests/driver/all.T b/testsuite/tests/driver/all.T
index 8c9bb40972..3440f9af16 100644
--- a/testsuite/tests/driver/all.T
+++ b/testsuite/tests/driver/all.T
@@ -354,3 +354,10 @@ test('T5584', normal, run_command,
test('T5198', extra_clean(['T5198dump/T5198.dump-simpl', 'T5198dump']),
run_command,
['$MAKE -s --no-print-directory T5198'])
+test('T7060',
+ extra_clean(['T7060dump/T7060.dump-rules',
+ 'T7060dump/T7060.dump-rule-firings',
+ 'T7060dump/T7060.dump-rule-rewrites',
+ 'T7060dump']),
+ run_command,
+ ['$MAKE -s --no-print-directory T7060'])