aboutsummaryrefslogtreecommitdiffstats
path: root/meson/test cases/common/145 recursive linking/circular/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'meson/test cases/common/145 recursive linking/circular/main.c')
-rw-r--r--meson/test cases/common/145 recursive linking/circular/main.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/meson/test cases/common/145 recursive linking/circular/main.c b/meson/test cases/common/145 recursive linking/circular/main.c
new file mode 100644
index 000000000..164abdf85
--- /dev/null
+++ b/meson/test cases/common/145 recursive linking/circular/main.c
@@ -0,0 +1,28 @@
+#include <stdio.h>
+
+#include "../lib.h"
+
+int get_st1_value (void);
+int get_st2_value (void);
+int get_st3_value (void);
+
+int main(void) {
+ int val;
+
+ val = get_st1_value ();
+ if (val != 5) {
+ printf("st1 value was %i instead of 5\n", val);
+ return -1;
+ }
+ val = get_st2_value ();
+ if (val != 4) {
+ printf("st2 value was %i instead of 4\n", val);
+ return -2;
+ }
+ val = get_st3_value ();
+ if (val != 3) {
+ printf("st3 value was %i instead of 3\n", val);
+ return -3;
+ }
+ return 0;
+}