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/] [gcc.dg/] [float-range-4.c] - Blame information for rev 298

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 298 jeremybenn
/* PR 23572 : warnings for out of range floating-point constants.  */
2
/* { dg-compile } */
3
/* { dg-options "-Wno-overflow -std=c99" } */
4
/* { dg-skip-if "No Inf support" { spu-*-* } } */
5
#include <math.h>
6
 
7
#ifndef INFINITY
8
#define INFINITY (__builtin_inff ())
9
#endif
10
 
11
void overflow(void)
12
{
13
  float f1 = 3.5E+38f;
14
  float f2 = -3.5E+38f;
15
  float f3 = INFINITY;
16
  float f4 = -INFINITY;
17
 
18
  double d1 = 1.9E+308;
19
  double d2 = -1.9E+308;
20
  double d3 = INFINITY;
21
  double d4 = -INFINITY;
22
}
23
 
24
void underflow(void)
25
{
26
  float f11 = 3.3E-10000000000000000000f;
27
  float f22 = -3.3E-10000000000000000000f;
28
  float f1 = 3.3E-46f;
29
  float f2 = -3.3E-46f;
30
  float f3 = 0;
31
  float f4 = -0;
32
  float f5 = 0.0;
33
  float f6 = -0.0;
34
 
35
  double d11 = 3.3E-10000000000000000000;
36
  double d22 = -3.3E-10000000000000000000;
37
  double d1 = 1.4E-325;
38
  double d2 = -1.4E-325;
39
  double d3 = 0;
40
  double d4 = -0;
41
  double d5 = 0.0;
42
  double d6 = -0.0;
43
}

powered by: WebSVN 2.1.0

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