summaryrefslogtreecommitdiffstats
path: root/misc/cgo/testcarchive/testdata/main8.c
diff options
context:
space:
mode:
Diffstat (limited to 'misc/cgo/testcarchive/testdata/main8.c')
-rw-r--r--misc/cgo/testcarchive/testdata/main8.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/misc/cgo/testcarchive/testdata/main8.c b/misc/cgo/testcarchive/testdata/main8.c
new file mode 100644
index 0000000..95fb7a3
--- /dev/null
+++ b/misc/cgo/testcarchive/testdata/main8.c
@@ -0,0 +1,16 @@
+// Copyright 2021 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Test preemption.
+
+#include <stdlib.h>
+
+#include "libgo8.h"
+
+int main() {
+ GoFunction8();
+
+ // That should have exited the program.
+ abort();
+}