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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [builtins-65.c] - Blame information for rev 698

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

Line No. Rev Author Line
1 689 jeremybenn
/* { dg-do link } */
2
/* { dg-options "-O2 -ffast-math" } */
3
/* { dg-require-effective-target c99_runtime } */
4
 
5
extern int ilogbf (float);
6
extern float logbf (float);
7
extern int ilogb (double);
8
extern double logb (double);
9
extern int ilogbl (long double);
10
extern long double logbl (long double);
11
 
12
extern void link_error(void);
13
 
14
void testf(float x)
15
{
16
  if ((int) logbf (x) != ilogbf (x))
17
    link_error ();
18
}
19
 
20
void test(double x)
21
{
22
  if ((int) logb (x) != ilogb (x))
23
    link_error ();
24
}
25
 
26
void testl(long double x)
27
{
28
  if ((int) logbl (x) != ilogbl (x))
29
    link_error ();
30
}
31
 
32
int main()
33
{
34
  testf (2.0f);
35
  test (2.0);
36
  testl (2.0l);
37
 
38
  return 0;
39
}
40
 

powered by: WebSVN 2.1.0

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