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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.dg/] [single-precision-constant.c] - Blame information for rev 154

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

Line No. Rev Author Line
1 149 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-options "-fsingle-precision-constant -mmacosx-version-min=10.3" { target powerpc-*-darwin* } } */
8
/* { dg-options "-fsingle-precision-constant -std=c99" { target *-*-solaris2* } } */
9
 
10
#include <math.h>
11
#include <float.h>
12
 
13
#include "builtins-config.h"
14
 
15
int main (void)
16
{
17
  int result = 0;
18
  double local_DBL_MAX = DBL_MAX;
19
  double local_DBL_MIN = DBL_MIN;
20
#ifdef HAVE_C99_RUNTIME
21
  if (isinf (local_DBL_MAX))
22
    result |= 1;
23
#endif
24
  if (local_DBL_MIN <= 0.0)
25
    result |= 1;
26
  return result;
27
}

powered by: WebSVN 2.1.0

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