GCC Middle and Back End API Reference
fp-test.c File Reference

Functions

double acos (double)
double asin (double)
double atan (double)
double atan2 (double, double)
double cos (double)
double sin (double)
double tan (double)
double cosh (double)
double sinh (double)
double tanh (double)
double exp (double)
double frexp (double, int *)
double ldexp (double, int)
double log (double)
double log10 (double)
double modf (double, double *)
double pow (double, double)
double sqrt (double)
double ceil (double)
double fabs (double)
double floor (double)
double fmod (double, double)
int main ()

Variables

int i1
int i2 = 2
volatile signed char sc
volatile unsigned char uc
volatile signed short ss
volatile unsigned short us
volatile signed int si
volatile unsigned int ui
volatile signed long sl
volatile unsigned long ul
volatile float f1 = 1.0
volatile float f2 = 1.0
volatile float f3 = 1.0
volatile double d1 = 1.0
volatile double d2 = 1.0
volatile double d3 = 1.0
volatile long double D1 = 1.0
volatile long double D2 = 1.0
volatile long double D3 = 1.0

Function Documentation

double acos ( double  )

fp-test.c - Check that all floating-point operations are available. Copyright (C) 1995-2013 Free Software Foundation, Inc. Contributed by Ronald F. Guilmette rfg@m.nosp@m.onke.nosp@m.ys.co.nosp@m.m.

This file is part of GCC.

GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version.

GCC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see http://www.gnu.org/licenses/. This is a trivial test program which may be useful to people who are porting the GCC or G++ compilers to a new system. The intent here is merely to check that all floating-point operations have been provided by the port. (Note that I say provided'' rather thanimplemented''.)

To use this file, simply compile it (with GCC or G++) and then try to link it in the normal way (also using GCC or G++ respectively). If all of the floating -point operations (including conversions) have been provided, then this file will link without incident. If however one or more of the primitive floating-point operations have not been properly provided, you will get link-time errors indicating which floating-point operations are unavailable.

This file will typically be used when porting the GNU compilers to some system which lacks floating-point hardware, and for which software emulation routines (for FP ops) are needed in order to complete the port.

double asin ( double  )
double atan ( double  )
double atan2 ( double  ,
double   
)
double ceil ( double  )
double cos ( double  )
double cosh ( double  )
double fabs ( double  )
double floor ( double  )
double fmod ( double  ,
double   
)
double frexp ( double  ,
int *   
)
double ldexp ( double  ,
int   
)
double log ( double  )
double log10 ( double  )
int main ( )

TYPE: float

double modf ( double  ,
double *   
)
double pow ( double  ,
double   
)
double sin ( double  )
double sinh ( double  )
double sqrt ( double  )
double tan ( double  )
double tanh ( double  )

Variable Documentation

volatile double d1 = 1.0
volatile long double D1 = 1.0
volatile double d2 = 1.0
volatile long double D2 = 1.0
volatile double d3 = 1.0
volatile long double D3 = 1.0
volatile float f1 = 1.0

Referenced by build_cdtor().

volatile float f2 = 1.0

Referenced by build_cdtor().

volatile float f3 = 1.0
int i1
volatile signed char sc

Referenced by cst_and_fits_in_hwi().

volatile signed long sl

Referenced by display_help(), and load_specs().

volatile signed short ss
volatile unsigned char uc
volatile unsigned int ui
volatile unsigned long ul
volatile unsigned short us