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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [c-c++-common/] [dfp/] [signbit-2.c] - Blame information for rev 295

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 295 jeremybenn
/* { dg-options "-O0" } */
2
 
3
/* Check that the compiler uses builtins for signbit; if not the link
4
   will fail because library functions are in libm.  */
5
 
6
#include "dfp-dbg.h"
7
 
8
volatile _Decimal32 sd = 2.3df;
9
volatile _Decimal64 dd = -4.5dd;
10
volatile _Decimal128 tf = 5.3dl;
11
volatile float f = 1.2f;
12
volatile double d = -7.8;
13
volatile long double ld = 3.4L;
14
 
15
EXTERN int signbitf (float);
16
EXTERN int signbit (double);
17
EXTERN int signbitl (long double);
18
EXTERN int signbitd32 (_Decimal32);
19
EXTERN int signbitd64 (_Decimal64);
20
EXTERN int signbitd128 (_Decimal128);
21
 
22
int
23
main ()
24
{
25
  if (signbitf (f) != 0) FAILURE
26
  if (signbit (d) == 0) FAILURE
27
  if (signbitl (ld) != 0) FAILURE
28
  if (signbitd32 (sd) != 0) FAILURE
29
  if (signbitd64 (dd) == 0) FAILURE
30
  if (signbitd128 (tf) != 0) FAILURE
31
 
32
  FINISH
33
}

powered by: WebSVN 2.1.0

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