summaryrefslogtreecommitdiff
path: root/test/dlopen/libundef.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/dlopen/libundef.c')
-rw-r--r--test/dlopen/libundef.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/dlopen/libundef.c b/test/dlopen/libundef.c
new file mode 100644
index 000000000..bf44c3c68
--- /dev/null
+++ b/test/dlopen/libundef.c
@@ -0,0 +1,15 @@
+#include <stdio.h>
+
+static int global_static = -1;
+
+int static_test(void)
+{
+ static int local_static = -2;
+
+ if (global_static != -1)
+ printf("FAIL: global_static is not -1\n");
+ if (local_static != -2)
+ printf("FAIL: local_static is not -2\n");
+
+ return (global_static == -1 && local_static == -2);
+}