Debian Codegraph @

test cases/common/145 recursive linking/main.c

raw
1 #include <stdio.h>
2
3 #include "lib.h"
4
5 int get_stnodep_value (void);
6 int get_stshdep_value (void);
7 int get_ststdep_value (void);
8 SYMBOL_IMPORT int get_shnodep_value (void);
9 SYMBOL_IMPORT int get_shshdep_value (void);
10 SYMBOL_IMPORT int get_shstdep_value (void);
11
12 int main(void) {
13 int val;
14
15 val = get_shnodep_value ();
16 if (val != 1) {
17 printf("shnodep was %i instead of 1\n", val);
18 return -1;
19 }
20 val = get_stnodep_value ();
21 if (val != 2) {
22 printf("stnodep was %i instead of 2\n", val);
23 return -2;
24 }
25 val = get_shshdep_value ();
26 if (val != 1) {
27 printf("shshdep was %i instead of 1\n", val);
28 return -3;
29 }
30 val = get_shstdep_value ();
31 if (val != 2) {
32 printf("shstdep was %i instead of 2\n", val);
33 return -4;
34 }
35 val = get_stshdep_value ();
36 if (val != 1) {
37 printf("shstdep was %i instead of 1\n", val);
38 return -5;
39 }
40 val = get_ststdep_value ();
41 if (val != 2) {
42 printf("ststdep was %i instead of 2\n", val);
43 return -6;
44 }
45 return 0;
46 }