OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.c-torture/] [execute/] [930603-3.c] - Blame information for rev 301

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

Line No. Rev Author Line
1 297 jeremybenn
f (b, c)
2
     unsigned char *b;
3
     int c;
4
{
5
  unsigned long v = 0;
6
  switch (c)
7
    {
8
    case 'd':
9
      v = ((unsigned long)b[0] << 8) + b[1];
10
      v >>= 9;
11
      break;
12
 
13
    case 'k':
14
      v = b[3] >> 4;
15
      break;
16
 
17
    default:
18
      abort ();
19
    }
20
 
21
  return v;
22
}
23
main ()
24
{
25
  char buf[4];
26
  buf[0] = 170; buf[1] = 5;
27
  if (f (buf, 'd') != 85)
28
    abort ();
29
  exit (0);
30
}

powered by: WebSVN 2.1.0

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