OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.dg/] [builtins-19.c] - Blame information for rev 645

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
/* Copyright (C) 2003  Free Software Foundation.
2
 
3
   Check that cabs of a non-complex argument is converted into fabs.
4
 
5
   Written by Roger Sayle, 1st June 2003.  */
6
 
7
/* { dg-do link } */
8
/* { dg-options "-O2 -ffast-math" } */
9
 
10
double cabs (__complex__ double);
11
float cabsf (__complex__ float);
12
long double cabsl (__complex__ long double);
13
double fabs (double);
14
float fabsf (float);
15
long double fabsl (long double);
16
 
17
void link_error (void);
18
 
19
void test (double x)
20
{
21
  if (cabs (x) != fabs (x))
22
    link_error ();
23
}
24
 
25
void testf (float x)
26
{
27
  if (cabsf (x) != fabsf (x))
28
    link_error ();
29
}
30
 
31
void testl (long double x)
32
{
33
  if (cabsl (x) != fabsl (x))
34
    link_error ();
35
}
36
 
37
int main ()
38
{
39
  test (1.0);
40
  testf (1.0f);
41
  testl (1.0l);
42
  return 0;
43
}
44
 

powered by: WebSVN 2.1.0

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