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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [single-precision-constant.c] - Blame information for rev 801

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

Line No. Rev Author Line
1 689 jeremybenn
/* Test that double precision constants are correctly handled
2
   when code is compiled with -fsingle-precision-constant */
3
/* Origin: Carlos O'Donell <carlos@codesourcery.com> */
4
 
5
/* { dg-do run } */
6
/* { dg-options "-fsingle-precision-constant" } */
7
/* { dg-add-options c99_runtime } */
8
 
9
#include <math.h>
10
#include <float.h>
11
 
12
#include "builtins-config.h"
13
 
14
int main (void)
15
{
16
  int result = 0;
17
  double local_DBL_MAX = DBL_MAX;
18
  double local_DBL_MIN = DBL_MIN;
19
#ifdef HAVE_C99_RUNTIME
20
  if (isinf (local_DBL_MAX))
21
    result |= 1;
22
#endif
23
  if (local_DBL_MIN <= 0.0)
24
    result |= 1;
25
  return result;
26
}

powered by: WebSVN 2.1.0

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