diff options
Diffstat (limited to 'testsuite/tests')
-rw-r--r-- | testsuite/tests/rts/T14611/Makefile | 10 | ||||
-rw-r--r-- | testsuite/tests/rts/T14611/T14611.stdout | 1 | ||||
-rw-r--r-- | testsuite/tests/rts/T14611/all.T | 4 | ||||
-rw-r--r-- | testsuite/tests/rts/T14611/foo.c | 6 | ||||
-rw-r--r-- | testsuite/tests/rts/T14611/foo_dll.c | 4 | ||||
-rw-r--r-- | testsuite/tests/rts/T14611/main.hs | 5 |
6 files changed, 30 insertions, 0 deletions
diff --git a/testsuite/tests/rts/T14611/Makefile b/testsuite/tests/rts/T14611/Makefile new file mode 100644 index 0000000000..4fc3f86ba5 --- /dev/null +++ b/testsuite/tests/rts/T14611/Makefile @@ -0,0 +1,10 @@ +TOP=../../.. +include $(TOP)/mk/boilerplate.mk +include $(TOP)/mk/test.mk + +T14611: + '$(TEST_CC)' -c foo.c -o foo.o + '$(AR)' rsc libfoo.a foo.o + '$(TEST_HC)' -shared foo_dll.c -o libfoo-1.dll + mv libfoo-1.dll.a libfoo.dll.a + echo main | LIBRARY_PATH="$(PWD)" '$(TEST_HC)' $(TEST_HC_OPTS_INTERACTIVE) main.hs -lfoo diff --git a/testsuite/tests/rts/T14611/T14611.stdout b/testsuite/tests/rts/T14611/T14611.stdout new file mode 100644 index 0000000000..d00491fd7e --- /dev/null +++ b/testsuite/tests/rts/T14611/T14611.stdout @@ -0,0 +1 @@ +1 diff --git a/testsuite/tests/rts/T14611/all.T b/testsuite/tests/rts/T14611/all.T new file mode 100644 index 0000000000..1387e6752d --- /dev/null +++ b/testsuite/tests/rts/T14611/all.T @@ -0,0 +1,4 @@ +test('T14611', + [extra_files(['foo.c', 'main.hs', 'foo_dll.c']), + unless(opsys('mingw32'), skip)], + run_command, ['$MAKE -s --no-print-directory T14611']) diff --git a/testsuite/tests/rts/T14611/foo.c b/testsuite/tests/rts/T14611/foo.c new file mode 100644 index 0000000000..af8ad9cb50 --- /dev/null +++ b/testsuite/tests/rts/T14611/foo.c @@ -0,0 +1,6 @@ +extern int bar(); + +int foo () +{ + return bar(); +} diff --git a/testsuite/tests/rts/T14611/foo_dll.c b/testsuite/tests/rts/T14611/foo_dll.c new file mode 100644 index 0000000000..8ea6c22735 --- /dev/null +++ b/testsuite/tests/rts/T14611/foo_dll.c @@ -0,0 +1,4 @@ +int foo() +{ + return 1; +} diff --git a/testsuite/tests/rts/T14611/main.hs b/testsuite/tests/rts/T14611/main.hs new file mode 100644 index 0000000000..fbc8f5603c --- /dev/null +++ b/testsuite/tests/rts/T14611/main.hs @@ -0,0 +1,5 @@ +module Main where + +foreign import ccall "foo" c_foo :: Int + +main = print c_foo |