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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [20040627-1.c] - Blame information for rev 801

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

Line No. Rev Author Line
1 689 jeremybenn
/* { dg-do link } */
2
/* { dg-options "-O2" } */
3
 
4
extern void link_error (void);
5
 
6
 
7
void test(int x)
8
{
9
  if ((x & ~x) != 0)
10
    link_error ();
11
  if ((~x & x) != 0)
12
    link_error ();
13
 
14
  if ((x ^ ~x) != -1)
15
    link_error ();
16
  if ((~x ^ x) != -1)
17
    link_error ();
18
 
19
  if ((x | ~x) != -1)
20
    link_error ();
21
  if ((~x | x) != -1)
22
    link_error ();
23
 
24
  if (x && !x)
25
    link_error ();
26
  if (!x && x)
27
    link_error ();
28
 
29
  if (!(x || !x))
30
    link_error ();
31
  if (!(!x || x))
32
    link_error ();
33
}
34
 
35
int main()
36
{
37
  test (0);
38
  test (1);
39
  test (-1);
40
  return 0;
41
}
42
 

powered by: WebSVN 2.1.0

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