tcl global directive outside proc body does nothing (ld)
[deliverable/binutils-gdb.git] / ld / testsuite / ld-ifunc / prog.c
CommitLineData
d8045f23
NC
1extern int printf (const char *, ...);
2
3extern int library_func1 (void);
4extern int library_func2 (void);
5extern int global;
6
7int
8main (void)
9{
10 int res = -1;
11
12 res += library_func1 ();
13 res += library_func2 ();
14
15 switch (res)
16 {
17 case 0:
18 if (global)
19 printf ("ifunc working correctly\n");
20 else
21 {
22 printf ("wrong value returned by library_func2\n");
23 res = -1;
24 }
25 break;
26
27 case 1:
28 if (global)
29 printf ("wrong value returned by library_func2\n");
30 else
31 {
32 printf ("ifunc working correctly\n");
33 res = 0;
34 }
35 break;
36
37 case 4:
38 printf ("non-ifunc testcase\n");
39 break;
40
41 default:
42 printf ("ifunc function not evaluated at run-time, res = %x\n", res);
43 break;
44 }
45 return res;
46}
This page took 0.503766 seconds and 4 git commands to generate.