Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

[project @ 1999-01-23 18:10:00 by sof]

even more h98 updates, this time to codeGen tests
  • Loading branch information...
commit b2170318027ec00dbd71c29b9bd561a3956fa7f3 1 parent eba9914
authored January 23, 1999

Showing 30 changed files with 49 additions and 44 deletions. Show diff stats Hide diff stats

  1. 7  ghc/tests/codeGen/should_run/Makefile
  2. 2  ghc/tests/codeGen/should_run/cg001.hs
  3. 2  ghc/tests/codeGen/should_run/cg005.hs
  4. 2  ghc/tests/codeGen/should_run/cg011.hs
  5. 2  ghc/tests/codeGen/should_run/cg012.hs
  6. 2  ghc/tests/codeGen/should_run/cg014.hs
  7. 2  ghc/tests/codeGen/should_run/cg016.hs
  8. 2  ghc/tests/codeGen/should_run/cg017.hs
  9. 2  ghc/tests/codeGen/should_run/cg018.hs
  10. 2  ghc/tests/codeGen/should_run/cg019.hs
  11. 2  ghc/tests/codeGen/should_run/cg020.hs
  12. 4  ghc/tests/codeGen/should_run/cg021.hs
  13. 4  ghc/tests/codeGen/should_run/cg022.hs
  14. 2  ghc/tests/codeGen/should_run/cg024.hs
  15. 2  ghc/tests/codeGen/should_run/cg025.hs
  16. 2  ghc/tests/codeGen/should_run/cg025.stderr
  17. 5  ghc/tests/codeGen/should_run/cg026.hs
  18. 4  ghc/tests/codeGen/should_run/cg026.stdout
  19. 2  ghc/tests/codeGen/should_run/cg027.hs
  20. 4  ghc/tests/codeGen/should_run/cg031.hs
  21. 2  ghc/tests/codeGen/should_run/cg032.hs
  22. 4  ghc/tests/codeGen/should_run/cg033.hs
  23. 3  ghc/tests/codeGen/should_run/cg034.hs
  24. 6  ghc/tests/codeGen/should_run/cg036.hs
  25. 6  ghc/tests/codeGen/should_run/cg039.hs
  26. 4  ghc/tests/codeGen/should_run/cg040.hs
  27. 2  ghc/tests/codeGen/should_run/cg042.hs
  28. 6  ghc/tests/codeGen/should_run/cg043.hs
  29. 2  ghc/tests/codeGen/should_run/cg044.hs
  30. 2  ghc/tests/codeGen/should_run/cg046.hs
7  ghc/tests/codeGen/should_run/Makefile
... ...
@@ -1,5 +1,5 @@
1 1
 #-----------------------------------------------------------------------------
2  
-# $Id: Makefile,v 1.7 1998/07/08 10:36:45 simonm Exp $
  2
+# $Id: Makefile,v 1.8 1999/01/23 18:10:00 sof Exp $
3 3
 
4 4
 TOP = ../..
5 5
 include $(TOP)/mk/boilerplate.mk
@@ -28,4 +28,9 @@ cg045_RUNTEST_OPTS = -x 1
28 28
 # mkdependHS doesn't understand OPTIONS pragmas...
29 29
 SRC_MKDEPENDHS_OPTS += -fglasgow-exts
30 30
 
  31
+.PRECIOUS: %.bin %.o
  32
+
  33
+clean ::
  34
+	rm -f *.bin *.o
  35
+
31 36
 include $(TOP)/mk/target.mk
2  ghc/tests/codeGen/should_run/cg001.hs
... ...
@@ -1,4 +1,4 @@
1  
---!! cg001: main = -42 -- take 1
  1
+-- !! cg001: main = -42 -- take 1
2 2
 
3 3
 main = print ( f () )
4 4
      where
2  ghc/tests/codeGen/should_run/cg005.hs
... ...
@@ -1,4 +1,4 @@
1  
---!! answer: 65532
  1
+-- !! answer: 65532
2 2
 
3 3
 main = print foo
4 4
 
2  ghc/tests/codeGen/should_run/cg011.hs
... ...
@@ -1,4 +1,4 @@
1  
---!!! simple overloading example
  1
+-- !!! simple overloading example
2 2
 
3 3
 class Foo a where
4 4
     foo :: a -> a -> Bool
2  ghc/tests/codeGen/should_run/cg012.hs
... ...
@@ -1,4 +1,4 @@
1  
---!!! move arguments around on the stacks, mainly the B stack
  1
+-- !!! move arguments around on the stacks, mainly the B stack
2 2
 
3 3
 import PrelBase	( Float#, Double#, Int#, Int(..) )
4 4
 
2  ghc/tests/codeGen/should_run/cg014.hs
... ...
@@ -1,3 +1,3 @@
1  
---!! cg014: main = -42 -- twice: in Float and Double
  1
+-- !! cg014: main = -42 -- twice: in Float and Double
2 2
 
3 3
 main = print ((show ( (-42) :: Float )) ++ " " ++ (show ( (-42) :: Double )) ++ "\n")
2  ghc/tests/codeGen/should_run/cg016.hs
... ...
@@ -1,4 +1,4 @@
1  
---!!! tests calls of `error' (that make calls of `error'...)
  1
+-- !!! tests calls of `error' (that make calls of `error'...)
2 2
 --
3 3
 main = error ("1st call to error\n"++(
4 4
        error ("2nd call to error\n"++(
2  ghc/tests/codeGen/should_run/cg017.hs
... ...
@@ -1,4 +1,4 @@
1  
---!!! test of cyclic default methods
  1
+-- !!! test of cyclic default methods
2 2
 --
3 3
 class Foo a where
4 4
     op1 :: Fractional b => a -> b -> Bool
2  ghc/tests/codeGen/should_run/cg018.hs
... ...
@@ -1,4 +1,4 @@
1  
---!!! test of datatype with many unboxed fields
  1
+-- !!! test of datatype with many unboxed fields
2 2
 --
3 3
 import PrelBase
4 4
 
2  ghc/tests/codeGen/should_run/cg019.hs
... ...
@@ -1,3 +1,3 @@
1  
---!!! printing of floating-pt numbers
  1
+-- !!! printing of floating-pt numbers
2 2
 --
3 3
 main = print (1.234e5 :: Float)
2  ghc/tests/codeGen/should_run/cg020.hs
... ...
@@ -1,3 +1,3 @@
1  
---!!! reading/showing of Ints/Integers
  1
+-- !!! reading/showing of Ints/Integers
2 2
 --
3 3
 main = print ((read "-1") :: Integer)
4  ghc/tests/codeGen/should_run/cg021.hs
... ...
@@ -1,5 +1,5 @@
1  
---!!! Tests garbage collection in the branch of a case
2  
---!!!	alternative where the constructor is returned in the heap.
  1
+-- !!! Tests garbage collection in the branch of a case
  2
+-- !!!	alternative where the constructor is returned in the heap.
3 3
 
4 4
 {- This is also a rather stressful test for another reason.
5 5
    The mutual recursion between munch and f causes lots of
4  ghc/tests/codeGen/should_run/cg022.hs
... ...
@@ -1,5 +1,5 @@
1  
---!!! tests stack stubbing: if "f" doesn't stub "ns",
2  
---!!! the program has a space leak.
  1
+-- !!! tests stack stubbing: if "f" doesn't stub "ns",
  2
+-- !!! the program has a space leak.
3 3
 
4 4
 module Main where
5 5
 
2  ghc/tests/codeGen/should_run/cg024.hs
... ...
@@ -1,4 +1,4 @@
1  
---!!! test super-dictionary grabification
  1
+-- !!! test super-dictionary grabification
2 2
 --
3 3
 
4 4
 main = putStr (show (is_one (1.2::Double)))
2  ghc/tests/codeGen/should_run/cg025.hs
... ...
@@ -1,4 +1,4 @@
1  
---!!! test various I/O Requests
  1
+-- !!! test various I/O Requests
2 2
 --
3 3
 --
4 4
 import IO
2  ghc/tests/codeGen/should_run/cg025.stderr
... ...
@@ -1,7 +1,7 @@
1 1
 "cg025.bin"
2 2
 ["cg025.hs"]
3 3
 GOT PATH
4  
---!!! test various I/O Requests
  4
+-- !!! test various I/O Requests
5 5
 --
6 6
 --
7 7
 import IO
5  ghc/tests/codeGen/should_run/cg026.hs
... ...
@@ -1,4 +1,4 @@
1  
---!!! simple tests of primitive arrays
  1
+-- !!! simple tests of primitive arrays
2 2
 --
3 3
 module Main ( main ) where
4 4
 
@@ -29,7 +29,8 @@ test_chars
29 29
   = let str = reverse "Now is the time for all good men to come to...\n"
30 30
     in
31 31
     unsafePerformIO (
32  
-	_ccall_ fprintf (``stdout''::Addr) "%d %s\n" 93 str >>
  32
+	_ccall_ fprintf (``stdout''::Addr) "%d %s\n" (93::Int) str >>
  33
+	_ccall_ fflush  (``stdout''::Addr)  >>
33 34
 	return ""
34 35
 	)
35 36
 
4  ghc/tests/codeGen/should_run/cg026.stdout
... ...
@@ -1,3 +1,5 @@
  1
+93 
  2
+...ot emoc ot nem doog lla rof emit eht si woN
1 3
 
2 4
 [1764,1849,1936,2025,2116,2209,2304,2401,2500,2601,2704,2809,2916,3025,3136,3249,3364,3481,3600,3721,3844,3969,4096,4225,4356,4489,4624,4761,4900,5041,5184,5329,5476,5625,5776,5929,6084,6241,6400,6561,6724,6889,7056,7225,7396,7569,7744,7921,8100,8281,8464,8649,8836,9025,9216,9409,9604,9801,10000,10201,10404,10609,10816,11025,11236,11449,11664,11881,12100,12321,12544,12769,12996,13225,13456,13689,13924,14161,14400,14641,14884,15129,15376,15625,15876,16129,16384,16641,16900,17161,17424,17689,17956,18225,18496,18769,19044,19321,19600,19881,20164,20449,20736,21025,21316,21609,21904,22201,22500,22801,23104,23409,23716,24025,24336,24649,24964,25281,25600,25921,26244,26569,26896,27225,27556,27889,28224,28561,28900,29241,29584,29929,30276,30625,30976,31329,31684,32041,32400,32761,33124,33489,33856,34225,34596,34969,35344,35721,36100,36481,36864,37249,37636,38025,38416,38809,39204,39601,40000,40401,40804,41209,41616,42025,42436,42849,43264,43681,44100,44521,44944,45369,45796,46225,46656,47089,47524,47961,48400,48841,49284,49729,50176,50625,51076,51529,51984,52441,52900,53361,53824,54289,54756,55225,55696,56169,56644,57121,57600,58081,58564,59049,59536,60025,60516,61009,61504,62001,62500,63001,63504,64009,64516,65025,65536,66049,66564,67081,67600,68121,68644,69169,69696,70225,70756,71289,71824,72361,72900,73441,73984,74529,75076,75625,76176,76729,77284,77841,78400,78961,79524,80089,80656,81225,81796,82369,82944,83521,84100,84681,85264,85849,86436,87025,87616,88209,88804,89401,90000,90601,91204,91809,92416,93025,93636,94249,94864,95481,96100,96721,97344,97969,98596,99225,99856,100489,101124,101761,102400,103041,103684,104329,104976,105625,106276,106929,107584,108241,108900,109561,110224,110889,111556,112225,112896,113569,114244,114921,115600,116281,116964,117649,118336,119025,119716,120409,121104,121801,122500,123201,123904,124609,125316,126025,126736,127449,128164,128881,129600,130321,131044,131769,132496,133225,133956,134689,135424,136161,136900,137641,138384,139129,139876,140625,141376,142129,142884,143641,144400,145161,145924,146689,147456,148225,148996,149769,150544,151321,152100,152881,153664,154449,155236,156025,156816,157609,158404,159201,160000,160801,161604,162409,163216,164025,164836,165649,166464,167281,168100,168921,169744,170569,171396,172225,173056]
3 5
 
@@ -9,5 +11,3 @@
9 11
 
10 12
 [1764 % 1,1849 % 1,1936 % 1,2025 % 1,2116 % 1,2209 % 1,2304 % 1,2401 % 1,2500 % 1,2601 % 1,2704 % 1,2809 % 1,2916 % 1,3025 % 1,3136 % 1,3249 % 1,3364 % 1,3481 % 1,3600 % 1,3721 % 1,3844 % 1,3969 % 1,4096 % 1,4225 % 1,4356 % 1,4489 % 1,4624 % 1,4761 % 1,4900 % 1,5041 % 1,5184 % 1,5329 % 1,5476 % 1,5625 % 1,5776 % 1,5929 % 1,6084 % 1,6241 % 1,6400 % 1,6561 % 1,6724 % 1,6889 % 1,7056 % 1,7225 % 1,7396 % 1,7569 % 1,7744 % 1,7921 % 1,8100 % 1,8281 % 1,8464 % 1,8649 % 1,8836 % 1,9025 % 1,9216 % 1,9409 % 1,9604 % 1,9801 % 1,10000 % 1,10201 % 1,10404 % 1,10609 % 1,10816 % 1,11025 % 1,11236 % 1,11449 % 1,11664 % 1,11881 % 1,12100 % 1,12321 % 1,12544 % 1,12769 % 1,12996 % 1,13225 % 1,13456 % 1,13689 % 1,13924 % 1,14161 % 1,14400 % 1,14641 % 1,14884 % 1,15129 % 1,15376 % 1,15625 % 1,15876 % 1,16129 % 1,16384 % 1,16641 % 1,16900 % 1,17161 % 1,17424 % 1,17689 % 1,17956 % 1,18225 % 1,18496 % 1,18769 % 1,19044 % 1,19321 % 1,19600 % 1,19881 % 1,20164 % 1,20449 % 1,20736 % 1,21025 % 1,21316 % 1,21609 % 1,21904 % 1,22201 % 1,22500 % 1,22801 % 1,23104 % 1,23409 % 1,23716 % 1,24025 % 1,24336 % 1,24649 % 1,24964 % 1,25281 % 1,25600 % 1,25921 % 1,26244 % 1,26569 % 1,26896 % 1,27225 % 1,27556 % 1,27889 % 1,28224 % 1,28561 % 1,28900 % 1,29241 % 1,29584 % 1,29929 % 1,30276 % 1,30625 % 1,30976 % 1,31329 % 1,31684 % 1,32041 % 1,32400 % 1,32761 % 1,33124 % 1,33489 % 1,33856 % 1,34225 % 1,34596 % 1,34969 % 1,35344 % 1,35721 % 1,36100 % 1,36481 % 1,36864 % 1,37249 % 1,37636 % 1,38025 % 1,38416 % 1,38809 % 1,39204 % 1,39601 % 1,40000 % 1,40401 % 1,40804 % 1,41209 % 1,41616 % 1,42025 % 1,42436 % 1,42849 % 1,43264 % 1,43681 % 1,44100 % 1,44521 % 1,44944 % 1,45369 % 1,45796 % 1,46225 % 1,46656 % 1,47089 % 1,47524 % 1,47961 % 1,48400 % 1,48841 % 1,49284 % 1,49729 % 1,50176 % 1,50625 % 1,51076 % 1,51529 % 1,51984 % 1,52441 % 1,52900 % 1,53361 % 1,53824 % 1,54289 % 1,54756 % 1,55225 % 1,55696 % 1,56169 % 1,56644 % 1,57121 % 1,57600 % 1,58081 % 1,58564 % 1,59049 % 1,59536 % 1,60025 % 1,60516 % 1,61009 % 1,61504 % 1,62001 % 1,62500 % 1,63001 % 1,63504 % 1,64009 % 1,64516 % 1,65025 % 1,65536 % 1,66049 % 1,66564 % 1,67081 % 1,67600 % 1,68121 % 1,68644 % 1,69169 % 1,69696 % 1,70225 % 1,70756 % 1,71289 % 1,71824 % 1,72361 % 1,72900 % 1,73441 % 1,73984 % 1,74529 % 1,75076 % 1,75625 % 1,76176 % 1,76729 % 1,77284 % 1,77841 % 1,78400 % 1,78961 % 1,79524 % 1,80089 % 1,80656 % 1,81225 % 1,81796 % 1,82369 % 1,82944 % 1,83521 % 1,84100 % 1,84681 % 1,85264 % 1,85849 % 1,86436 % 1,87025 % 1,87616 % 1,88209 % 1,88804 % 1,89401 % 1,90000 % 1,90601 % 1,91204 % 1,91809 % 1,92416 % 1,93025 % 1,93636 % 1,94249 % 1,94864 % 1,95481 % 1,96100 % 1,96721 % 1,97344 % 1,97969 % 1,98596 % 1,99225 % 1,99856 % 1,100489 % 1,101124 % 1,101761 % 1,102400 % 1,103041 % 1,103684 % 1,104329 % 1,104976 % 1,105625 % 1,106276 % 1,106929 % 1,107584 % 1,108241 % 1,108900 % 1,109561 % 1,110224 % 1,110889 % 1,111556 % 1,112225 % 1,112896 % 1,113569 % 1,114244 % 1,114921 % 1,115600 % 1,116281 % 1,116964 % 1,117649 % 1,118336 % 1,119025 % 1,119716 % 1,120409 % 1,121104 % 1,121801 % 1,122500 % 1,123201 % 1,123904 % 1,124609 % 1,125316 % 1,126025 % 1,126736 % 1,127449 % 1,128164 % 1,128881 % 1,129600 % 1,130321 % 1,131044 % 1,131769 % 1,132496 % 1,133225 % 1,133956 % 1,134689 % 1,135424 % 1,136161 % 1,136900 % 1,137641 % 1,138384 % 1,139129 % 1,139876 % 1,140625 % 1,141376 % 1,142129 % 1,142884 % 1,143641 % 1,144400 % 1,145161 % 1,145924 % 1,146689 % 1,147456 % 1,148225 % 1,148996 % 1,149769 % 1,150544 % 1,151321 % 1,152100 % 1,152881 % 1,153664 % 1,154449 % 1,155236 % 1,156025 % 1,156816 % 1,157609 % 1,158404 % 1,159201 % 1,160000 % 1,3 % 5,3 % 5,3 % 5,3 % 5,3 % 5,3 % 5,3 % 5,3 % 5,3 % 5,3 % 5,3 % 5,3 % 5,3 % 5,3 % 5,3 % 5,3 % 5]
11 13
 
12  
-93 
13  
-...ot emoc ot nem doog lla rof emit eht si woN
2  ghc/tests/codeGen/should_run/cg027.hs
... ...
@@ -1,4 +1,4 @@
1  
---!!! simple test of 0-method classes
  1
+-- !!! simple test of 0-method classes
2 2
 --
3 3
 
4 4
 class (Num a, Integral a) => Foo a
4  ghc/tests/codeGen/should_run/cg031.hs
... ...
@@ -1,5 +1,5 @@
1  
---!! test GEN reps w/ unboxed values in them
2  
---!! NB: it was the static ones that were hosed...
  1
+-- !! test GEN reps w/ unboxed values in them
  2
+-- !! NB: it was the static ones that were hosed...
3 3
 --
4 4
 module Main ( main ) where
5 5
 
2  ghc/tests/codeGen/should_run/cg032.hs
... ...
@@ -1,4 +1,4 @@
1  
---!! pattern-matching failure on functions that return Int#
  1
+-- !! pattern-matching failure on functions that return Int#
2 2
 
3 3
 import PrelBase --ghc1.3
4 4
 
4  ghc/tests/codeGen/should_run/cg033.hs
... ...
@@ -1,5 +1,5 @@
1  
---!! worker/wrapper turns ( \ <absent> -> Int# ) function
2  
---!! into Int# -- WRONG
  1
+-- !! worker/wrapper turns ( \ <absent> -> Int# ) function
  2
+-- !! into Int# -- WRONG
3 3
 
4 4
 import PrelBase --ghc1.3
5 5
 
3  ghc/tests/codeGen/should_run/cg034.hs
... ...
@@ -1,3 +1,4 @@
  1
+-- !! fromRational woes
1 2
 import Ratio -- 1.3
2 3
 
3 4
 main = putStr (
@@ -32,8 +33,6 @@ main = putStr (
32 33
     y_f = 1.82173691287639817263897126389712638972163e-300
33 34
     y_d = 1.82173691287639817263897126389712638972163e-300
34 35
 
35  
---!! fromRational woes
36  
-
37 36
 fromRationalX :: (RealFloat a) => Rational -> a
38 37
 fromRationalX r =
39 38
 	let 
6  ghc/tests/codeGen/should_run/cg036.hs
... ...
@@ -1,6 +1,6 @@
1  
---!! Won't compile unless the compile succeeds on
2  
---!! the "single occurrence of big thing in a duplicated small thing"
3  
---!! inlining old-chestnut.  WDP 95/03
  1
+-- !! Won't compile unless the compile succeeds on
  2
+-- !! the "single occurrence of big thing in a duplicated small thing"
  3
+-- !! inlining old-chestnut.  WDP 95/03
4 4
 --
5 5
 module Main ( main, g ) where
6 6
 
6  ghc/tests/codeGen/should_run/cg039.hs
... ...
@@ -1,6 +1,6 @@
1  
---! From a Rick Morgan bug report:
2  
---! Single-method class with a locally-polymorphic
3  
---! method.
  1
+-- !!! From a Rick Morgan bug report:
  2
+-- !!! Single-method class with a locally-polymorphic
  3
+-- !!! method.
4 4
 
5 5
 module Main where
6 6
 
4  ghc/tests/codeGen/should_run/cg040.hs
@@ -8,9 +8,9 @@ f1 :: Int -> Burble Int
8 8
 f1 n = B1 { op1 = \x->x+n, op2 = \x -> x, op3 = n }
9 9
 
10 10
 f2 :: Burble a -> Int -> Int
11  
-f2 r@(B1 {op1, op2}) n = op1 (op2 n) + op3 r
  11
+f2 r@(B1 {op1 = op1 , op2 = op2 }) n = op1 (op2 n) + op3 r
12 12
 
13 13
 f3 :: Burble a -> Burble a
14  
-f3 x@(B1 {op3}) = x {op3 = op3+1}
  14
+f3 x@(B1 {op3=op3}) = x {op3 = op3+1}
15 15
 
16 16
 main = print (f2 (f3 (f1 3)) 4)
2  ghc/tests/codeGen/should_run/cg042.hs
... ...
@@ -1,4 +1,4 @@
1  
---!!! mutable Double array test (ncg test)
  1
+-- !!! mutable Double array test (ncg test)
2 2
 --
3 3
 module Main ( main ) where
4 4
 
6  ghc/tests/codeGen/should_run/cg043.hs
... ...
@@ -1,6 +1,6 @@
1  
---!!! Tickled a bug in core2stg 
2  
---!!! (CoreSyn.Coerce constructors were not peeled off
3  
---!!! when converting CoreSyn.App)
  1
+-- !!! Tickled a bug in core2stg 
  2
+-- !!! (CoreSyn.Coerce constructors were not peeled off
  3
+-- !!! when converting CoreSyn.App)
4 4
 
5 5
 module Main where
6 6
 
2  ghc/tests/codeGen/should_run/cg044.hs
... ...
@@ -1,4 +1,4 @@
1  
---!!! Testing IEEE Float and Double extremity predicates.
  1
+-- !!! Testing IEEE Float and Double extremity predicates.
2 2
 module Main(main) where
3 3
 
4 4
 main :: IO ()
2  ghc/tests/codeGen/should_run/cg046.hs
@@ -2,7 +2,7 @@ module Main where
2 2
 
3 3
 import IO
4 4
 
5  
---!!! CAF space leaks
  5
+-- !!! CAF space leaks
6 6
 
7 7
 main = lots_of_xs 10000
8 8
 

0 notes on commit b217031

Please sign in to comment.
Something went wrong with that request. Please try again.