Make T8832 operative on 32-bit systems (#8832)
authorReid Barton <rwbarton@gmail.com>
Tue, 19 Aug 2014 02:27:38 +0000 (22:27 -0400)
committerReid Barton <rwbarton@gmail.com>
Tue, 19 Aug 2014 03:14:20 +0000 (23:14 -0400)
(Also, the 'extra_clean' was unnecessary.)

testsuite/tests/simplCore/should_compile/Makefile
testsuite/tests/simplCore/should_compile/T8832.hs
testsuite/tests/simplCore/should_compile/T8832.stdout-ws-32 [new file with mode: 0644]
testsuite/tests/simplCore/should_compile/all.T

index d615a5e..07eedf1 100644 (file)
@@ -4,7 +4,7 @@ include $(TOP)/mk/test.mk
 
 T8832:
        $(RM) -f T8832.o T8832.hi
-       '$(TEST_HC)' $(TEST_HC_OPTS) -O -c -ddump-simpl T8832.hs | grep '#'
+       '$(TEST_HC)' $(TEST_HC_OPTS) $(T8832_WORDSIZE_OPTS) -O -c -ddump-simpl T8832.hs | grep '#'
 
 T7865:
        $(RM) -f T7865.o T7865.hi
index 9059a18..d2e4ca0 100644 (file)
@@ -17,12 +17,16 @@ T(i,Int)
 T(i8,Int8)
 T(i16,Int16)
 T(i32,Int32)
+#ifdef T8832_WORDSIZE_64
 T(i64,Int64)
+#endif
 
 T(w,Word)
 T(w8,Word8)
 T(w16,Word16)
 T(w32,Word32)
+#ifdef T8832_WORDSIZE_64
 T(w64,Word64)
+#endif
 
 T(z,Integer)
\ No newline at end of file
diff --git a/testsuite/tests/simplCore/should_compile/T8832.stdout-ws-32 b/testsuite/tests/simplCore/should_compile/T8832.stdout-ws-32
new file mode 100644 (file)
index 0000000..d092937
--- /dev/null
@@ -0,0 +1,8 @@
+T8832.i = GHC.Types.I# 0
+T8832.i8 = GHC.Int.I8# 0
+T8832.i16 = GHC.Int.I16# 0
+T8832.i32 = GHC.Int.I32# 0
+T8832.w = GHC.Types.W# (__word 0)
+T8832.w8 = GHC.Word.W8# (__word 0)
+T8832.w16 = GHC.Word.W16# (__word 0)
+T8832.w32 = GHC.Word.W32# (__word 0)
index f9a5846..c4c32cc 100644 (file)
@@ -198,9 +198,10 @@ test('T5996',
      ['$MAKE -s --no-print-directory T5996'])
 test('T8537', normal, compile, [''])
 test('T8832',
-     [when(wordsize(32), expect_fail), extra_clean(['T8832.hi', 'T8832a.o'])],
+     normal,
      run_command,
-     ['$MAKE -s --no-print-directory T8832'])
+     ['$MAKE -s --no-print-directory T8832 T8832_WORDSIZE_OPTS=' +
+      ('-DT8832_WORDSIZE_64' if wordsize(64) else '')])
 test('T8848', only_ways(['optasm']), compile, ['-ddump-rule-firings'])
 test('T8848a', only_ways(['optasm']), compile, ['-ddump-rules'])
 test('T8331', only_ways(['optasm']), compile, ['-ddump-rules'])