summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--testsuite/tests/rts/Makefile7
-rw-r--r--testsuite/tests/rts/T7037.hs1
-rw-r--r--testsuite/tests/rts/T7037.stdout1
-rw-r--r--testsuite/tests/rts/T7037_main.c6
-rw-r--r--testsuite/tests/rts/all.T4
5 files changed, 19 insertions, 0 deletions
diff --git a/testsuite/tests/rts/Makefile b/testsuite/tests/rts/Makefile
index 971807db93..3690a92bba 100644
--- a/testsuite/tests/rts/Makefile
+++ b/testsuite/tests/rts/Makefile
@@ -47,3 +47,10 @@ T5423:
T6006_setup :
'$(TEST_HC)' $(TEST_HC_OPTS) -c T6006.hs
+
+.PHONY: T7037
+T7037:
+ $(RM) 7037.o 7037.hi 7037$(exeext)
+ "$(TEST_HC)" $(TEST_HC_OPTS) T7037.hs -v0
+ "$(TEST_HC)" $(filter-out -rtsopts, $(TEST_HC_OPTS)) T7037_main.c -v0 -o T7037_main -no-hs-main
+ ./T7037_main
diff --git a/testsuite/tests/rts/T7037.hs b/testsuite/tests/rts/T7037.hs
new file mode 100644
index 0000000000..f19d103666
--- /dev/null
+++ b/testsuite/tests/rts/T7037.hs
@@ -0,0 +1 @@
+main = print "ok"
diff --git a/testsuite/tests/rts/T7037.stdout b/testsuite/tests/rts/T7037.stdout
new file mode 100644
index 0000000000..52c33a57c7
--- /dev/null
+++ b/testsuite/tests/rts/T7037.stdout
@@ -0,0 +1 @@
+"ok"
diff --git a/testsuite/tests/rts/T7037_main.c b/testsuite/tests/rts/T7037_main.c
new file mode 100644
index 0000000000..91f3130a43
--- /dev/null
+++ b/testsuite/tests/rts/T7037_main.c
@@ -0,0 +1,6 @@
+#include <unistd.h>
+
+int main(int argc, char *argv[]) {
+ char *args[1] = {NULL};
+ execv("./T7037", args);
+}
diff --git a/testsuite/tests/rts/all.T b/testsuite/tests/rts/all.T
index 6f42d2f2df..b4db8d316b 100644
--- a/testsuite/tests/rts/all.T
+++ b/testsuite/tests/rts/all.T
@@ -143,3 +143,7 @@ test('T6006', [ omit_ways(prof_ways + ['ghci']),
# needs it.
compile_and_run, ['T6006_c.c -no-hs-main'])
+test('T7037',
+ [ extra_clean(['T7037_main.o','T7037_main']) ],
+ run_command,
+ ['$MAKE -s --no-print-directory T7037'])