[commit: ghc] master: Add test case for #9013 (caa9c8aa)
git at git.haskell.org
git at git.haskell.org
Sat Aug 9 19:44:49 UTC 2014
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/caa9c8aa7d17af04e16070e15ba274da0ab93247/ghc
>---------------------------------------------------------------
commit caa9c8aa7d17af04e16070e15ba274da0ab93247
Author: Reid Barton <rwbarton at gmail.com>
Date: Sat Aug 9 15:08:34 2014 -0400
Add test case for #9013
>---------------------------------------------------------------
caa9c8aa7d17af04e16070e15ba274da0ab93247
testsuite/.gitignore | 1 +
testsuite/tests/codeGen/should_run/T9013.hs | 14 ++++++++++++++
.../codeGen/should_run/{T5149.stdout => T9013.stdout} | 0
testsuite/tests/codeGen/should_run/all.T | 5 +++++
4 files changed, 20 insertions(+)
diff --git a/testsuite/.gitignore b/testsuite/.gitignore
index d160143..f0f8132 100644
--- a/testsuite/.gitignore
+++ b/testsuite/.gitignore
@@ -180,6 +180,7 @@ mk/ghcconfig_*_inplace_bin_ghc-stage2.exe.mk
/tests/codeGen/should_run/T8103
/tests/codeGen/should_run/T8256
/tests/codeGen/should_run/T9001
+/tests/codeGen/should_run/T9013
/tests/codeGen/should_run/Word2Float64
/tests/codeGen/should_run/cgrun001
/tests/codeGen/should_run/cgrun002
diff --git a/testsuite/tests/codeGen/should_run/T9013.hs b/testsuite/tests/codeGen/should_run/T9013.hs
new file mode 100644
index 0000000..35c074e
--- /dev/null
+++ b/testsuite/tests/codeGen/should_run/T9013.hs
@@ -0,0 +1,14 @@
+{-# LANGUAGE MagicHash, UnboxedTuples #-}
+
+import GHC.Prim
+import GHC.Word
+
+big :: Word
+big = maxBound
+
+carry :: Word
+carry = case big of
+ W# w -> case plusWord2# w w of
+ (# hi, lo #) -> W# hi
+
+main = print carry
diff --git a/testsuite/tests/codeGen/should_run/T5149.stdout b/testsuite/tests/codeGen/should_run/T9013.stdout
similarity index 100%
copy from testsuite/tests/codeGen/should_run/T5149.stdout
copy to testsuite/tests/codeGen/should_run/T9013.stdout
diff --git a/testsuite/tests/codeGen/should_run/all.T b/testsuite/tests/codeGen/should_run/all.T
index 2d66c42..a5983a5 100644
--- a/testsuite/tests/codeGen/should_run/all.T
+++ b/testsuite/tests/codeGen/should_run/all.T
@@ -120,3 +120,8 @@ test('CopySmallArray', normal, compile_and_run, [''])
test('CopySmallArrayStressTest', reqlib('random'), compile_and_run, [''])
test('SizeOfSmallArray', normal, compile_and_run, [''])
test('T9001', normal, compile_and_run, [''])
+test('T9013',
+ [ omit_ways(['ghci']), # ghci doesn't support unboxed tuples
+ when(arch('x86') or arch('x86_64'),
+ expect_broken_for(9013, list(set(opt_ways) - set(llvm_ways)))) ],
+ compile_and_run, [''])
More information about the ghc-commits
mailing list