c++, coroutines: Simplify separation of the user function body and ramp.
[official-gcc.git] / gcc / testsuite / gcc.dg / ipa / inline-8.c
blobc51eec20fc830116ed66c6ec2760946f7458e3c0
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 #include <math.h>
7 extern int isnanf (float);
8 /* Can't be inlined because isnanf will be optimized out. */
9 static int
10 cmp (float a)
12 return isnanf (a);
14 /* Can be inlined. */
15 static int
16 move (int a)
18 return a;
20 float a;
21 void
22 set ()
24 a=nan("");
26 float b;
27 __attribute__ ((optimize("Ofast")))
28 int
29 main()
31 b++;
32 if (cmp(a))
33 __builtin_abort ();
34 float a = move (1);
35 if (!__builtin_constant_p (a))
36 __builtin_abort ();
37 return 0;