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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.c-torture/] [execute/] [931102-1.c] - Blame information for rev 825

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

Line No. Rev Author Line
1 149 jeremybenn
typedef union
2
{
3
  struct
4
    {
5
      char h, l;
6
    } b;
7
} T;
8
 
9
f (x)
10
     int x;
11
{
12
  int num = 0;
13
  T reg;
14
 
15
  reg.b.l = x;
16
  while ((reg.b.l & 1) == 0)
17
    {
18
      num++;
19
      reg.b.l >>= 1;
20
    }
21
  return num;
22
}
23
 
24
main ()
25
{
26
  if (f (2) != 1)
27
    abort ();
28
  exit (0);
29
}
30
 

powered by: WebSVN 2.1.0

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