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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-stable/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.dg/] [pr15785-1.c] - Blame information for rev 826

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 298 jeremybenn
/* { dg-do link } */
2
 
3
extern void link_error ();
4
 
5
void a (int x) {
6
        if (~ (~x) - x)
7
                link_error ();
8
}
9
void b (int x) {
10
        if (- (-x) - x)
11
                link_error ();
12
}
13
 
14
void c (int x) {
15
        if (!(- (~x) - x))
16
                link_error ();
17
}
18
 
19
void d (int x) {
20
        if (!(~ (-x) - x))
21
                link_error ();
22
}
23
 
24
void e (int x) {
25
        if (x + ~(x - 1))
26
                link_error ();
27
}
28
 
29
void f (int x) {
30
        if (x + ~(x + (-1)))
31
                link_error ();
32
}
33
 
34
int main (int argc, char *argv[]) {
35
        a(argc);
36
        b(argc);
37
        c(argc);
38
        d(argc);
39
        e(argc);
40
        f(argc);
41
        return 0;
42
}

powered by: WebSVN 2.1.0

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