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/] [builtins/] [abs-1-lib.c] - Rev 816
Compare with Previous | Blame | View Log
extern void abort (void); extern int abs_called; extern int inside_main; /* The labs call should have been optimized, but the abs call shouldn't have been. */ int abs (int x) { if (inside_main) abs_called = 1; return (x < 0 ? -x : x); } long labs (long x) { if (inside_main) abort (); return (x < 0 ? -x : x); }