OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [trunk/] [gnu-src/] [binutils-2.20.1/] [ld/] [testsuite/] [ld-ifunc/] [prog.c] - Blame information for rev 410

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 205 julius
extern int printf (const char *, ...);
2
 
3
extern int library_func1 (void);
4
extern int library_func2 (void);
5
extern int global;
6
 
7
int
8
main (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
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.