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

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc1/] [gcc/] [testsuite/] [gcc.c-torture/] [execute/] [builtins/] [abs-1.c] - Blame information for rev 338

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 297 jeremybenn
/* Test for -fno-builtin-FUNCTION.  */
2
/* Origin: Joseph Myers <jsm28@cam.ac.uk>.  */
3
/* GCC normally handles abs and labs as built-in functions even without
4
   optimization.  So test that with -fno-builtin-abs, labs is so handled
5
   but abs isn't.  */
6
 
7
int abs_called = 0;
8
 
9
extern int abs (int);
10
extern long labs (long);
11
extern void abort (void);
12
 
13
void
14
main_test (void)
15
{
16
  if (labs (0) != 0)
17
    abort ();
18
  if (abs (0) != 0)
19
    abort ();
20
  if (!abs_called)
21
    abort ();
22
}

powered by: WebSVN 2.1.0

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