summaryrefslogtreecommitdiffstats
path: root/tests/run-make/extern-fn-with-extern-types/ctest.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/run-make/extern-fn-with-extern-types/ctest.c')
-rw-r--r--tests/run-make/extern-fn-with-extern-types/ctest.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/run-make/extern-fn-with-extern-types/ctest.c b/tests/run-make/extern-fn-with-extern-types/ctest.c
new file mode 100644
index 000000000..3b6fb4cfc
--- /dev/null
+++ b/tests/run-make/extern-fn-with-extern-types/ctest.c
@@ -0,0 +1,16 @@
+#include <stdio.h>
+#include <stdint.h>
+
+typedef struct data {
+ uint32_t magic;
+} data;
+
+data* data_create(uint32_t magic) {
+ static data d;
+ d.magic = magic;
+ return &d;
+}
+
+uint32_t data_get(data* p) {
+ return p->magic;
+}