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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [fold-abs-2.c] - Blame information for rev 689

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 689 jeremybenn
/* { dg-do run } */
2
/* { dg-options "-O1 -fwrapv" } */
3
#include <limits.h>
4
void exit (int);
5
void abort ();
6
#define ABS(x) (x > 0 ? x : -x)
7
int f (int a) {
8
        if (ABS(a) >= 0) return 1;
9
        else return 0;
10
}
11
 
12
int main (int argc, char *argv[]) {
13
        if (f(INT_MIN))
14
          abort ();
15
        else
16
          exit (0);
17
}

powered by: WebSVN 2.1.0

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