summaryrefslogtreecommitdiff
path: root/testsuite/tests/dph
diff options
context:
space:
mode:
authorAmos Robinson <amos.robinson@gmail.com>2013-03-04 13:53:42 +1100
committerAmos Robinson <amos.robinson@gmail.com>2013-03-04 13:53:42 +1100
commit35a209ce021c18037d11489476b8fbc8dbe7bcd9 (patch)
tree3430a612473149a93d8e05c49288c75d1d65505a /testsuite/tests/dph
parenta3e9109116143dcc6740f8ade6c10db1a290232f (diff)
downloadhaskell-35a209ce021c18037d11489476b8fbc8dbe7bcd9.tar.gz
Trac #7736: Parallel array enumeration causes compiler panic (enumFromToP), expected fail
Diffstat (limited to 'testsuite/tests/dph')
-rw-r--r--testsuite/tests/dph/enumfromto/EnumFromToP.hs24
-rw-r--r--testsuite/tests/dph/enumfromto/Makefile3
-rw-r--r--testsuite/tests/dph/enumfromto/dph-enumfromto.T9
3 files changed, 36 insertions, 0 deletions
diff --git a/testsuite/tests/dph/enumfromto/EnumFromToP.hs b/testsuite/tests/dph/enumfromto/EnumFromToP.hs
new file mode 100644
index 0000000000..f210f21dab
--- /dev/null
+++ b/testsuite/tests/dph/enumfromto/EnumFromToP.hs
@@ -0,0 +1,24 @@
+-- List enumeration doesn't work for parallel list comprehensions.
+--
+-- > ghc-stage2: panic! (the 'impossible' happened)
+-- > (GHC version 7.7.20130109 for x86_64-unknown-linux):
+-- > DsMonad: uninitialised ds_parr_bi
+--
+-- (I.enumFromToP is a workaround)
+
+{-# LANGUAGE ParallelArrays, ParallelListComp #-}
+{-# OPTIONS -fvectorise #-}
+module EnumFromToP where
+
+import Data.Array.Parallel hiding ((+), (-), (*), (/))
+import Data.Array.Parallel.PArray
+import Data.Array.Parallel.Prelude.Bool as B
+import Data.Array.Parallel.Prelude.Double as D
+import qualified Data.Array.Parallel.Prelude.Int as I
+import qualified Data.Vector as V
+import qualified Prelude as P
+
+
+nums = [: 0 .. 100 :]
+
+
diff --git a/testsuite/tests/dph/enumfromto/Makefile b/testsuite/tests/dph/enumfromto/Makefile
new file mode 100644
index 0000000000..9101fbd40a
--- /dev/null
+++ b/testsuite/tests/dph/enumfromto/Makefile
@@ -0,0 +1,3 @@
+TOP=../../..
+include $(TOP)/mk/boilerplate.mk
+include $(TOP)/mk/test.mk
diff --git a/testsuite/tests/dph/enumfromto/dph-enumfromto.T b/testsuite/tests/dph/enumfromto/dph-enumfromto.T
new file mode 100644
index 0000000000..3d8257eb80
--- /dev/null
+++ b/testsuite/tests/dph/enumfromto/dph-enumfromto.T
@@ -0,0 +1,9 @@
+test ('EnumFromToP'
+ , [ extra_clean(['EnumFromToP.o', 'EnumFromToP.hi'])
+ , reqlib('dph-lifted-vseg')
+ , reqlib('dph-prim-par')
+ , ignore_output
+ , expect_broken(7736)
+ , only_ways(['normal', 'threaded1', 'threaded2']) ]
+ , compile_fail
+ , [ '-O -fno-enable-rewrite-rules -package dph-lifted-vseg'])