diff options
Diffstat (limited to 'testsuite')
6 files changed, 43 insertions, 0 deletions
diff --git a/testsuite/tests/cmm/should_compile/T21370/Main.hs b/testsuite/tests/cmm/should_compile/T21370/Main.hs new file mode 100644 index 0000000000..bcd34e1b4f --- /dev/null +++ b/testsuite/tests/cmm/should_compile/T21370/Main.hs @@ -0,0 +1,13 @@ +{-# LANGUAGE MagicHash #-} +{-# LANGUAGE GHCForeignImportPrim #-} +{-# LANGUAGE UnliftedFFITypes #-} +module Main where + +import GHC.Int +import GHC.Prim + +foreign import prim "test" test :: Int# -> Int# +foreign import prim "test2" test2 :: Int# -> Int# +foreign import prim "test3" test3 :: Int# -> Int# + +main = print (I# (test3 (test2 (test 0#)))) diff --git a/testsuite/tests/cmm/should_compile/T21370/Makefile b/testsuite/tests/cmm/should_compile/T21370/Makefile new file mode 100644 index 0000000000..0c2bcd11f4 --- /dev/null +++ b/testsuite/tests/cmm/should_compile/T21370/Makefile @@ -0,0 +1,14 @@ +TOP=../../../.. +include $(TOP)/mk/boilerplate.mk +include $(TOP)/mk/test.mk + +## check if -ddump-cmm-verbose -ddump-to-file generates files +# for all cmm stages and dumps correspond to correct procs +T21370: + '$(TEST_HC)' $(TEST_HC_OPTS) -c test.cmm -finfo-table-map + '$(TEST_HC)' $(TEST_HC_OPTS) -c test2.cmm -finfo-table-map + '$(TEST_HC)' $(TEST_HC_OPTS) -c subdir/test.cmm -finfo-table-map + '$(TEST_HC)' $(TEST_HC_OPTS) -c Main.hs -finfo-table-map + '$(TEST_HC)' $(TEST_HC_OPTS) Main.o test.o test2.o subdir/test.o + + diff --git a/testsuite/tests/cmm/should_compile/T21370/all.T b/testsuite/tests/cmm/should_compile/T21370/all.T new file mode 100644 index 0000000000..a88bb4d26f --- /dev/null +++ b/testsuite/tests/cmm/should_compile/T21370/all.T @@ -0,0 +1 @@ +test('T21370', [extra_files(["subdir", "test.cmm", "test2.cmm", "Main.hs"])] , makefile_test, []) diff --git a/testsuite/tests/cmm/should_compile/T21370/subdir/test.cmm b/testsuite/tests/cmm/should_compile/T21370/subdir/test.cmm new file mode 100644 index 0000000000..95503df8af --- /dev/null +++ b/testsuite/tests/cmm/should_compile/T21370/subdir/test.cmm @@ -0,0 +1,5 @@ +#include "Cmm.h" +test3 (W_ r1) + { + return (r1); + } diff --git a/testsuite/tests/cmm/should_compile/T21370/test.cmm b/testsuite/tests/cmm/should_compile/T21370/test.cmm new file mode 100644 index 0000000000..13e3aa3ebb --- /dev/null +++ b/testsuite/tests/cmm/should_compile/T21370/test.cmm @@ -0,0 +1,5 @@ +#include "Cmm.h" +test (W_ r1) + { + return (r1); + } diff --git a/testsuite/tests/cmm/should_compile/T21370/test2.cmm b/testsuite/tests/cmm/should_compile/T21370/test2.cmm new file mode 100644 index 0000000000..c591feecb6 --- /dev/null +++ b/testsuite/tests/cmm/should_compile/T21370/test2.cmm @@ -0,0 +1,5 @@ +#include "Cmm.h" +test2 (W_ r1) + { + return (r1); + } |