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/] [pr19005.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
/* PR target/19005 */
2
extern void abort (void);
3
 
4
int v, s;
5
 
6
void
7
bar (int a, int b)
8
{
9
  unsigned char x = v;
10
 
11
  if (!s)
12
    {
13
      if (a != x || b != (unsigned char) (x + 1))
14
        abort ();
15
    }
16
  else if (a != (unsigned char) (x + 1) || b != x)
17
    abort ();
18
  s ^= 1;
19
}
20
 
21
int
22
foo (int x)
23
{
24
  unsigned char a = x, b = x + 1;
25
 
26
  bar (a, b);
27
  a ^= b; b ^= a; a ^= b;
28
  bar (a, b);
29
  return 0;
30
}
31
 
32
int
33
main (void)
34
{
35
  for (v = -10; v < 266; v++)
36
    foo (v);
37
  return 0;
38
}

powered by: WebSVN 2.1.0

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