OSDN Git Service

* doc/passes.texi: Document predictive commoning.
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.dg / pr28796-2.c
1 /* { dg-do run } */
2 /* { dg-options "-O2 -funsafe-math-optimizations -fno-finite-math-only" } */
3 /* { dg-options "-mieee -O2 -funsafe-math-optimizations -fno-finite-math-only" { target alpha*-*-* } } */
4
5 extern void abort (void);
6
7 void foo(float f)
8 {
9   if (__builtin_isunordered (f, f) != 1)
10     abort ();
11   if (__builtin_isnan (f) != 1)
12     abort ();
13   if (__builtin_finite (f) != 0)
14     abort ();
15 }
16
17 int main()
18 {
19   float f = __builtin_nanf("");
20   foo(f);
21   return 0;
22 }