URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 298 |
Rev 338 |
/* { dg-do link } */
|
/* { dg-do link } */
|
|
|
extern void link_error ();
|
extern void link_error ();
|
|
|
void a (int x) {
|
void a (int x) {
|
if (~ (~x) - x)
|
if (~ (~x) - x)
|
link_error ();
|
link_error ();
|
}
|
}
|
void b (int x) {
|
void b (int x) {
|
if (- (-x) - x)
|
if (- (-x) - x)
|
link_error ();
|
link_error ();
|
}
|
}
|
|
|
void c (int x) {
|
void c (int x) {
|
if (!(- (~x) - x))
|
if (!(- (~x) - x))
|
link_error ();
|
link_error ();
|
}
|
}
|
|
|
void d (int x) {
|
void d (int x) {
|
if (!(~ (-x) - x))
|
if (!(~ (-x) - x))
|
link_error ();
|
link_error ();
|
}
|
}
|
|
|
void e (int x) {
|
void e (int x) {
|
if (x + ~(x - 1))
|
if (x + ~(x - 1))
|
link_error ();
|
link_error ();
|
}
|
}
|
|
|
void f (int x) {
|
void f (int x) {
|
if (x + ~(x + (-1)))
|
if (x + ~(x + (-1)))
|
link_error ();
|
link_error ();
|
}
|
}
|
|
|
int main (int argc, char *argv[]) {
|
int main (int argc, char *argv[]) {
|
a(argc);
|
a(argc);
|
b(argc);
|
b(argc);
|
c(argc);
|
c(argc);
|
d(argc);
|
d(argc);
|
e(argc);
|
e(argc);
|
f(argc);
|
f(argc);
|
return 0;
|
return 0;
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.