Repository : ssh://darcs.haskell.org//srv/darcs/testsuite

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/e9b95e9eb045dda1fb93729e752b742fa0983116

>---------------------------------------------------------------

commit e9b95e9eb045dda1fb93729e752b742fa0983116
Author: Edward Z. Yang <[email protected]>
Date:   Tue Jun 28 08:20:50 2011 -0400

    Another variant of hashStr, this one caught a Hoopl bug.
    
    Signed-off-by: Edward Z. Yang <[email protected]>

>---------------------------------------------------------------

 tests/ghc-regress/codeGen/should_compile/all.T     |    1 +
 .../cgrun066.hs => should_compile/cg008.hs}        |    9 ++++-----
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/tests/ghc-regress/codeGen/should_compile/all.T 
b/tests/ghc-regress/codeGen/should_compile/all.T
index 2f61d79..ba29c2a 100644
--- a/tests/ghc-regress/codeGen/should_compile/all.T
+++ b/tests/ghc-regress/codeGen/should_compile/all.T
@@ -5,6 +5,7 @@ test('cg004', normal, compile, [''])
 test('cg005', only_ways(['optasm']), compile, [''])
 test('cg006', normal, compile, [''])
 test('cg007', normal, compile, [''])
+test('cg008', normal, compile, [''])
 
 test('1916', normal, compile, [''])
 test('2388', normal, compile, [''])
diff --git a/tests/ghc-regress/codeGen/should_run/cgrun066.hs 
b/tests/ghc-regress/codeGen/should_compile/cg008.hs
similarity index 75%
copy from tests/ghc-regress/codeGen/should_run/cgrun066.hs
copy to tests/ghc-regress/codeGen/should_compile/cg008.hs
index aa1c621..10099c1 100644
--- a/tests/ghc-regress/codeGen/should_run/cgrun066.hs
+++ b/tests/ghc-regress/codeGen/should_compile/cg008.hs
@@ -1,6 +1,10 @@
 {-# LANGUAGE MagicHash, BangPatterns #-}
 {-# OPTIONS_GHC -O0 #-}
 
+-- Variant of cgrun066; compilation as a module is different.
+
+module Cg008 (hashStr) where
+
 import Foreign.C
 import Data.Word
 import Foreign.Ptr
@@ -15,8 +19,3 @@ hashStr (Ptr a#) (I# len#) = loop 0# 0#
              | otherwise  = loop h2 (n GHC.Exts.+# 1#)
           where !c = ord# (indexCharOffAddr# a# n)
                 !h2 = (c GHC.Exts.+# (h GHC.Exts.*# 128#)) `remInt#` 4091#
-
--- Infinite loops with new code generator + C-- optimizations
-main = do
-    withCStringLen "ff" $ \(ptr, l) -> do
-        print (hashStr (castPtr ptr) l)



_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to