URL
https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk
Go to most recent revision |
Only display areas with differences |
Details |
Blame |
View Log
Rev 149 |
Rev 154 |
/* Test for -fno-builtin-FUNCTION. */
|
/* Test for -fno-builtin-FUNCTION. */
|
/* Origin: Joseph Myers <jsm28@cam.ac.uk>. */
|
/* Origin: Joseph Myers <jsm28@cam.ac.uk>. */
|
/* GCC normally handles abs and labs as built-in functions even without
|
/* GCC normally handles abs and labs as built-in functions even without
|
optimization. So test that with -fno-builtin-abs, labs is so handled
|
optimization. So test that with -fno-builtin-abs, labs is so handled
|
but abs isn't. */
|
but abs isn't. */
|
|
|
int abs_called = 0;
|
int abs_called = 0;
|
|
|
extern int abs (int);
|
extern int abs (int);
|
extern long labs (long);
|
extern long labs (long);
|
extern void abort (void);
|
extern void abort (void);
|
|
|
void
|
void
|
main_test (void)
|
main_test (void)
|
{
|
{
|
if (labs (0) != 0)
|
if (labs (0) != 0)
|
abort ();
|
abort ();
|
if (abs (0) != 0)
|
if (abs (0) != 0)
|
abort ();
|
abort ();
|
if (!abs_called)
|
if (!abs_called)
|
abort ();
|
abort ();
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.