OSDN Git Service

2006-01-05 Erik Edelmann <eedelman@gcc.gnu.org>
[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 /* { dg-do run } */
5 /* { dg-options "-fsingle-precision-constant" } */
6 #include <math.h>
7 #include <float.h>
8
9 int main (void)
10 {
11   int result = 0;
12   double local_DBL_MAX = DBL_MAX; 
13   double local_DBL_MIN = DBL_MIN;
14   if (isinf (local_DBL_MAX))
15     result |= 1;
16   if (local_DBL_MIN <= 0.0)
17     result |= 1;
18   return result;
19 }