Test case for #9938
authorJoachim Breitner <mail@joachim-breitner.de>
Mon, 29 Dec 2014 18:37:19 +0000 (19:37 +0100)
committerJoachim Breitner <mail@joachim-breitner.de>
Mon, 29 Dec 2014 18:39:11 +0000 (19:39 +0100)
Marked as known_broken

testsuite/tests/driver/Makefile
testsuite/tests/driver/T9938.hs [new file with mode: 0644]
testsuite/tests/driver/all.T

index 11724a5..2acedfc 100644 (file)
@@ -586,3 +586,9 @@ write_interface_make:
        $(RM) -rf write_interface_make/A011.hi
        "$(TEST_HC)" $(TEST_HC_OPTS) -hidir write_interface_make -fno-code -fwrite-interface --make A011.hs
        test -f write_interface_make/A011.hi
+
+.PHONY: T9938
+T9938:
+       $(RM) -rf T9938.o T9938.hi T9938
+       "$(TEST_HC)" -c T9938.hs
+       "$(TEST_HC)" T9938.o -o T9938
diff --git a/testsuite/tests/driver/T9938.hs b/testsuite/tests/driver/T9938.hs
new file mode 100644 (file)
index 0000000..f9bb131
--- /dev/null
@@ -0,0 +1,13 @@
+module Main where
+
+import Control.Monad
+import Control.Monad.Trans.State
+
+solve :: Int -> StateT () [] ()
+solve carry | carry > 0 =
+  do guard (0 == carry)
+     solve (carry -1)
+solve 0 = mzero
+
+main :: IO ()
+main = return ()
index ed4d924..cd38ceb 100644 (file)
@@ -410,3 +410,7 @@ test('write_interface_make', normal, run_command, ['$MAKE -s --no-print-director
 
 test('T9776', normal, compile_fail, ['-frule-check'])
 
+test('T9938',
+     [ extra_clean(['T9938.hi', 'T9938.o', 'T9938']), expect_broken(9938)],
+     run_command,
+     ['$MAKE -s --no-print-directory T9938'])