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

Subversion Repositories scarts

[/] [scarts/] [trunk/] [toolchain/] [scarts-gcc/] [gcc-4.1.1/] [gcc/] [testsuite/] [gcc.c-torture/] [unsorted/] [subcc.c] - Blame information for rev 12

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 12 jlechner
int foo (a, c)
2
{
3
  int b;
4
 
5
  if (a + c >= 0)                        /* b < 0 ==== a < 10? */
6
    return a | 0x80000000;
7
  return 0;
8
}
9
 
10
void bar (a)
11
     int a;
12
{
13
  if (foo (a, 10) & 0x80000000)
14
    printf ("y");
15
  else
16
    printf ("n");
17
}
18
 
19
int main ()
20
{
21
  bar (0);
22
  bar (1);
23
  bar (-1);
24
  bar (10);
25
  bar (-10);
26
  bar (11);
27
  bar (-11);
28
  bar (0x7fffffff);
29
  bar (-0x7fffffff);
30
 
31
  puts ("");
32
  return 0;
33
}

powered by: WebSVN 2.1.0

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