OSDN Git Service

* doc/loop.texi: Document possibility not to perform disambiguation
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.dg / single-precision-constant.c
1 /* 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 }