diff options
author | Simon Peyton Jones <simonpj@microsoft.com> | 2012-06-08 09:46:35 +0100 |
---|---|---|
committer | Simon Peyton Jones <simonpj@microsoft.com> | 2012-06-08 09:46:35 +0100 |
commit | 29d83fe3e9e01789c8687235c49118d221fd4585 (patch) | |
tree | 4b0b7b7f70222217872073f604a78cc9f540023d /testsuite | |
parent | c85a85fdb0ec57c7a1716287552cdfc8df1b5de5 (diff) | |
parent | 1e169cfb232b5a172e6f3858b2a10c42953b4552 (diff) | |
download | haskell-29d83fe3e9e01789c8687235c49118d221fd4585.tar.gz |
Merge branch 'master' of http://darcs.haskell.org/testsuite
Diffstat (limited to 'testsuite')
-rw-r--r-- | testsuite/tests/codeGen/should_run/6146.hs | 20 | ||||
-rw-r--r-- | testsuite/tests/codeGen/should_run/6146.stdin | 2 | ||||
-rw-r--r-- | testsuite/tests/codeGen/should_run/6146.stdout | 3 | ||||
-rw-r--r-- | testsuite/tests/codeGen/should_run/all.T | 2 |
4 files changed, 27 insertions, 0 deletions
diff --git a/testsuite/tests/codeGen/should_run/6146.hs b/testsuite/tests/codeGen/should_run/6146.hs new file mode 100644 index 0000000000..1142f5fabd --- /dev/null +++ b/testsuite/tests/codeGen/should_run/6146.hs @@ -0,0 +1,20 @@ +-- Test #6146 (a bug in -feager-blackholing) I couldn't reliably +-- reproduce it, but this program occasionally triggers it so it's +-- better than nothing. + +module Main (main) where + +import System.IO +import Control.Concurrent +import System.Mem + +main :: IO () +main = do + putStrLn "First number? " + num1 <- readLn :: IO Int + performGC -- provokes bug (sometimes) + putStrLn "Second number? " + num2 <- readLn :: IO Int + let total = num1 + num2 + putStrLn $ "The sum is " ++ (show total) ++ "." + diff --git a/testsuite/tests/codeGen/should_run/6146.stdin b/testsuite/tests/codeGen/should_run/6146.stdin new file mode 100644 index 0000000000..4792e70f33 --- /dev/null +++ b/testsuite/tests/codeGen/should_run/6146.stdin @@ -0,0 +1,2 @@ +2 +3 diff --git a/testsuite/tests/codeGen/should_run/6146.stdout b/testsuite/tests/codeGen/should_run/6146.stdout new file mode 100644 index 0000000000..e6ce1acc30 --- /dev/null +++ b/testsuite/tests/codeGen/should_run/6146.stdout @@ -0,0 +1,3 @@ +First number? +Second number? +The sum is 5. diff --git a/testsuite/tests/codeGen/should_run/all.T b/testsuite/tests/codeGen/should_run/all.T index 5e268eba98..272eb4ac48 100644 --- a/testsuite/tests/codeGen/should_run/all.T +++ b/testsuite/tests/codeGen/should_run/all.T @@ -91,3 +91,5 @@ test('5747', if_arch('i386', extra_hc_opts('-msse2')), compile_and_run, ['-O2']) test('5785', normal, compile_and_run, ['']) test('setByteArray', normal, compile_and_run, ['']) +test('6146', normal, compile_and_run, ['']) + |