1 /* Verify that we do not inline isnanf test info -ffast-math code but that we
2    do inline trivial functions across -Ofast boundary.  */
3 /* { dg-do run } */
4 /* { dg-require-effective-target c99_runtime } */
5 /* { dg-options "-O2"  } */
6 /* { dg-add-options c99_runtime } */
7 #include <math.h>
8 extern int isnanf (float);
9 /* Can't be inlined because isnanf will be optimized out.  */
10 int
cmp(float a)11 cmp (float a)
12 {
13   return isnanf (a);
14 }
15 /* Can be inlined.  */
16 int
move(int a)17 move (int a)
18 {
19   return a;
20 }
21 float a;
22 void
set()23 set ()
24 {
25  a=nan("");
26 }
27 float b;
28 __attribute__ ((optimize("Ofast")))
29 int
main()30 main()
31 {
32   b++;
33   if (cmp(a))
34     __builtin_abort ();
35   float a = move (1);
36   if (!__builtin_constant_p (a))
37     __builtin_abort ();
38   return 0;
39 }
40